Part Number Hot Search : 
CMX615P3 D5023 GW20N HV101K6 2SK679A 170M6592 CONTROLS 02770
Product Description
Full Text Search
 

To Download SGTL5000 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  freescale semiconductor, inc. reserves t he right to change the detail specifications, as may be required, to permit improvements in the design of its products. document number: SGTL5000 rev. 6.0, 11/2013 freescale semiconductor ? technical data ? freescale semiconductor, inc. , 2008-2013. all rights reserved. low power stereo codec with headphone amp the SGTL5000 is a low power stereo codec with headphone amp from freescale, and is designed to provide a complete audio solution for products needing linein, mic_in, lineout, headphone-out, and digital i/o. deriving it?s architectu re from best in class, freescale integrated products that are currently on the market. the SGTL5000 is able to achieve ultra low power with very high performance and functionality, all in one of the sma llest footprints available. target markets include media players, navigation devices, smart phones, tablets, medical equipment, exercise equipment, consumer audio equipment, etc. feat ures such as capless headphone design and an internal pll help lowe r overall system cost. features analog inputs ? stereo linein - support for external analog input ? stereo linein - codec bypass for low power ? mic bias provided ? programmable mic gain ? adc - 85 db snr (-60 db input) and -73 db thd+n (vdda = 1.8 v) analog outputs ? hp output - capless design ? hp output - 62.5 mw max, 1.02 khz sine into 16 ? load at 3.3 v ? hp output - 100 db snr (-60 db input) and -80 db thd+n (v dda = 1.8 v, 16 ? load, dac to headphone) ? lineout - 100 db snr (-60 db input) and -85 db thd+n (v ddio = 3.3 v) digital i/o ?i 2 s port to allow routing to application processor integrated digital processing ? freescale surround, freescale ba ss, tone control/ parametric equalizer/graphic equalizer clocking/control ? pll allows input of an 8.0 mhz to 27 mhz system clock - standard audio clocks are derived from pll power supplies ? designed to operate from 1.62 to 3.6 volts figure 1. SGTL5000 simplified application diagram audio codec SGTL5000 ordering information device temperature range (t a ) package SGTL5000xnla3/r2 -40 to 85 c 20 qfn SGTL5000xnaa3/r2 32 qfn pb-free 98are10742d 20-pin qfn pb-free 98are10739d 32-pin qfn i2s interface headphone / line out w/ volume audio switch adc dac i2 s_dout i2s_din i2s_sclk i2s_lrclk l i n e o u t _ r l i n e o u t _ l h p _ r hp_l i2c/spi control sys_mclk pll application processor headphone speaker amp/docking station/fmtx audio processing analog in (stereo line in, mic) linein_r linein_l mic_in mic_bias mp3/fm input mic in/speech recognition i2s interface headphone / line out w/ volume audio switch adc dac i2 s_dout i2s_din i2s_sclk i2s_lrclk l i n e o u t _ r l i n e o u t _ l h p _ r hp_l i2c/spi control sys_mclk pll application processor headphone speaker amp/docking station/fmtx audio processing analog in (stereo line in, mic) linein_r linein_l mic_in mic_bias mp3/fm input mic in/speech recognition note: spi is not supported in the 3.0 mm x 3.0 mm 20-pin qfn package
analog integrated circuit device data ? 2 freescale semiconductor SGTL5000 internal block diagram internal block diagram figure 2. SGTL5000 simplified internal block diagram mic gain (0db, 20db, 30db, 40db ) mic_in audio switch i2s_din adc i2s_dout mix +6db tone control /geq/peq +12 db bass enhancement +6db surround avc +12db dac dac volume control -90db to 0db headphone volume control -52db to +12db ( chip_ana_hp_ctrl ) hp_out analog gain digital gain analog gain (0 to 22.5db) only gain is shown for the digital audio processing blocks. for complete description please see digital audio processing section. line out volume control ( chip_line_out_vol ) lineout line_in
analog integrated circuit device data ? freescale semiconductor 3 SGTL5000 pin connections pin connections figure 3. SGTL5000 pin connections a functional description can be found in functional description , beginning on page 12 . table 1. SGTL5000 pin definitions 20 pin qfn 32 pin qfn pin name pin function formal name definition 1 2 hp_r analog right headphone output 2 4 hp_vgnd analog headphone virtual ground do not connect hp_vgnd to system ground, even when unused. this is a virtual ground (dc voltage) that should never connect to an actual ?0 volt ground?. use the widest, shortest trac e possible for the hp_vgnd. 3 5 vdda power analog voltage 4 6 hp_l analog left headphone output - 7 agnd analog ground ground - 8, 9, 17, 19, 22, 28 nc no connect 5 10 vag analog dac vag filter 6 11 lineout_r analog right lineout 7 12 lineout_l analog left lineout 8 13 linein_r analog right linein 9 14 linein_l analog left linein 20 qfn transparent top view 32 qfn transparent top view 1 2 3 4 5 678910 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 101112 13141516 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 hp_r hp_vgnd vdda hp_l vag lineout_r lineout_l linein_r linein_l mic mic_bias vddio sys_mclk i2s_lrclk i2s_sclk i2s_dout i2s_din ctrl_data ctrl_clk vddd lineout_r lineout_l linein_r linein_l mic mic_bias cpfilt nc i2s_lrclk i2s_sclk i2s_dout i2s_din ctrl_data ctrl_clk vddd hp_r hp_vgnd vdda hp_l nc gnd agnd nc nc ctrl_mode ctrl_adr0_cs gnd sys_mclk vddio vag nc nc gnd gnd
analog integrated circuit device data ? 4 freescale semiconductor SGTL5000 pin connections 10 15 mic analog microphone input 11 16 mic_bias analog mic bias ? 18 cpfilt analog charge pump filter the cpfilt cap value is 0.1 ? f. if both vddio and vdda are ? 3.0 v, the cpfilt pin must be connected to a 0.1 ? f cap to gnd. if either is > 3.0 v, the cpfilt cap must not be placed. 12 20 vddio power digital i/o voltage 13 21 sys_mclk digital system master clock 14 23 i2s_lrclk digital i 2 s frame clock 15 24 i2s_sclk digital i 2 s bit clock 16 25 i2s_dout digital i 2 s data output 17 26 i2s_din digital i 2 s data input 18 27 ctrl_data digital i 2 c mode: serial data (sda); spi mode: serial data input (mosi) 19 29 ctrl_clk digital i 2 c mode: serial clock (scl); spi mode: serial clock (sck) 20 30 vddd digital digital voltage for new designs, connect vddd to an external voltage source and to a 0.1 ? f capacitor to gnd. - 31 ctrl_adr0_cs digital i 2 c mode: i 2 c address select 0; spi mode: spi chip select - 32 ctrl_mode digital mode select for i 2 c or spi; when pulled low the control mode is i 2 c, when pulled high the control mode is spi pad 1, 3, 4, pad gnd ground ground the pad must be soldered to ground. star the ground pins of the chip, vag ground, and all analog inputs/outputs to a single point, then to the ground plane. table 1. SGTL5000 pin definitions (continued) 20 pin qfn 32 pin qfn pin name pin function formal name definition
analog integrated circuit device data ? freescale semiconductor 5 SGTL5000 electrical characteristics maximum ratings electrical characteristics maximum ratings table 2. maximum ratings exceeding the absolute maximum ratings shown in the following table could cause permanent damage to the part and is not recommended. normal operation is not guaran teed at the absolute maximum ratings, and extended exposure could affect long term reliability. ratings symbol value unit electrical ratings maximum digital voltage v ddd 1.98 v maximum digital i/o voltage v ddio 3.6 v maximum analog supply voltage v dda 3.6 v maximum voltage on any digital input gnd-0.3 to v ddio +0.3 v maximum voltage on any analog input gnd-0.3 to v dda +0.3 v thermal ratings storage temperature t stg - 55 to 125 ? c operating temperature ambient t a - 40 to 85 ? c table 3. recommended operating conditions ratings symbol value unit digital voltage (if supplied externally). external vddd connection required for new designs. v ddd 1.1 to 2.0 v digital i/o voltage v ddio 1.62 to 3.6 v analog supply voltage v dda 1.62 to 3.6 v
analog integrated circuit device data ? 6 freescale semiconductor SGTL5000 electrical characteristics maximum ratings table 4. input/output elect rical characteristics test conditions unless otherwise noted: v ddio = 3.3 v, v dda = 3.3 v, t a = 25 c, slave mode, f s = 48 khz, mclk = 256 f s , ? 24 bit input, 1.02 khz sine. characteristic symbol min typ max unit linein input level (3.3 v vdda) - - 2.83 v pp linein input level (1.8 v vdda) - - 1.60 v pp mic input level (3.3 v vdda) - - 2.83 v pp mic input level (1.8 v vdda) - - 1.60 v pp lineout output level 0 dbfs at 1.031 khz 12s input, 1.8 v lineout supply (normally vddio), 10 k ? load 1.46 1.52 1.68 v pp lineout output level 0 dbfs at 1.031 khz 12s input, 3.3 v lineout supply (normally vddio), 10 k ? load 2.53 2.61 3.11 v pp linein input impedance - 29 - k ? mic input impedance - 2.9 - k ? lineout output impedance - 320 - ? lineout load 10 - - k ? hp (headphone) load 16 - - ? sys_mclk input voltage swing -0.3 v ddio v ddio +0.3 v sys_mclk rise/fall time 0.5 - 10 ns
analog integrated circuit device data ? freescale semiconductor 7 SGTL5000 electrical characteristics static electrical characteristics static electrical characteristics table 5. audio performance 1 test conditions unless otherwise noted: v ddio = 1.8 v, v dda = 1.8 v, t a = 25 c, slave mode, f s = 48 khz, mclk = 256 f s , ? 24 bit input characteristic symbol min typ max unit audio performance linein input level - 0.57 - v rms linein input impedance (at 1.02 khz) - 29 - k ? linein -> adc -> i 2 s out snr (-60 db input) - 85 - db thd+n - -70 - db frequency response - ? 0.11 - db channel separation - 79 - db linein -> headphone_line out (codec bypass mode) snr (-60 db input) - 98 - db thd+n (10 k ? load) - -87 - db thd+n (16 ? load) - -87 - db frequency response - ? 0.05 - db channel separation (at 1.0 khz) 82 db i 2 s in -> dac -> lineout output level - 0.6 - v rms snr (-60 db input) - 95 - db thd+n - -85 - db frequency response - ? 0.12 - db i 2 s in -> dac -> headphone out - 16 ? load output power - 17 - mw snr (-60 db input) - 100 - db thd+n - -80 - db frequency response - ? 0.12 - db i 2 s in -> dac -> headphone out - 32 ? load output power - 10 - mw snr (-60 db input) - 95 - db thd+n - -86 - db frequency response - ? 0.11 - db i 2 s in -> dac -> headphone out - 10 k ? load snr (-60 db input) - 96 - db thd+n - -84 - db frequency response - ? 0.11 - db psrr (200 mvp-p at 1.0 khz on vdda) - 85 - db
analog integrated circuit device data ? 8 freescale semiconductor SGTL5000 electrical characteristics static electrical characteristics table 6. audio performance 2 test conditions unless otherwise noted: v ddio = 3.3 v, v dda = 3.3 v, t a = 25 c, slave mode, f s = 48 khz, mclk = 256 f s , 24 bit input. adc tests were conducted with bias_ctrl = -37.5%, all other tests con ducted with bias_ctrl = -50%. characteristic symbol min typ max unit audio performance linein input level - 1.0 - v rms linein input impedance (at 1.02 khz) - 29 - k ? linein -> adc -> i 2 s out snr (-60 db input) - 90 - db thd+n - -72 - db frequency response - ? 0.11 - db channel separation - 80 - db linein -> headphone_line out (codec bypass mode) snr (-60 db input) - 102 - db thd+n (10 k ? load) - -89 - db thd+n (16 ? load) - -87 - db frequency response - ? 0.05 - db channel separation (at 1.0 khz) 81 db i 2 s in -> dac -> lineout output level - 1.0 - v rms snr (-60 db input) - 100 - db thd+n - -85 - db frequency response - ? 0.12 - db i 2 s in -> dac -> headphone out - 16 ? load output power - 58 - mw snr (-60 db input) - 98 - db thd+n - -86 - db frequency response - ? 0.12 - db i 2 s in -> dac -> headphone out - 32 ? load output power - 30 - mw snr (-60 db input) - 100 - db thd+n - -88 - db frequency response - ? 0.11 - db i 2 s in -> dac -> headphone out - 10 k ? load snr (-60 db input) - 97 - db thd+n - -85 - db frequency response - ? 0.11 - db psrr (200 mvp-p at 1.0 khz on vdda) - 89 - db
analog integrated circuit device data ? freescale semiconductor 9 SGTL5000 electrical characteristics dynamic electrical characteristics dynamic electrical characteristics table 7. dynamic electri cal characteristics characteristic symbol min typ max unit power up timing time from all supplies powered up and sys_mclk present to initial communication. see figure 4 . t pc 1.0 (2) ? - ? s i2c bus timing (3) see figure 5 . i 2 c serial clock frequency f i2c_clk - - 400 khz i 2 c start condition hold time t i2csh 150 - - ns i 2 c stop condition setup time t i2cstsu 150 - - ns i 2 c data input setup time to rising edge of ctrl_clk t i2cdsu 125 - - ns i 2 c data input hold time from falling edge of ctrl_clk (receiving data) t i2cdh 5.0 - - ns i 2 c data input hold time from falling edge of ctrl_clk (driving data) t i2cdh 360 - - ns i 2 c ctrl_clk low time t i2cclkl 300 - - ns i 2 c ctrl_clk high time t i2cclkh 100 - - ns spi bus timing (4) see figure 6 . spi serial clock frequency f spi_clk - - tbd mhz spi data input setup time t spidsu 10 - - ns spi data input hold time t spidh 10 - - ns spi ctrl_clk low time t spiclkl tbd - - ns spi ctrl_clk high time t spiclkh tbd - - ns spi clock to chip select t ccs 60 - - ns spi chip select to clock t csc 20 - - ns spi chip select low t csl 20 - - ns spi chip select high t csh 20 ns specifications and timing for the i 2 s port (5) see figure 7 . frequency of i 2 s_lrclk f lrclk 8.0 - 96 khz frequency of i 2 s_sclk f sclk - 32*f lrclk 64*f lrclk - khz i 2 s delay t i2s_d - - 10 ns i 2 s setup time t i2s_s 10 - - ns i 2 s hold time t i2s_h 10 - - ns notes 1. the SGTL5000 has an internal reset that is deasserted 8 sys_mc lk cycles after all power rails have been brought up. after thi s time, communication can start. 2. 1.0 ? s represents 8 sys_mclk cycles at the minimum 8.0 mhz sys_mclk. 3. this section provides timi ng for the SGTL5000 while in i 2 c mode (ctrl_mode = 0). 4. this section provides timing for t he SGTL5000 while in spi mode (ctrl_mode = 1) 5. the following are the specifications and timing for i 2 s port. the timing applies to all formats.
analog integrated circuit device data ? 10 freescale semiconductor SGTL5000 electrical characteristics timing diagrams timing diagrams figure 4. power up timing figure 5. i 2 c timing (ctrl_mode == 0) figure 6. spi timing vdda vddio vddd (if used) sys_mclk tpc ctrl_data ctrl_clk ctrl_adr0_cs initial communication 1/fi2c_clk ti2csh ti2cclkh ti2cclkl ti2cdsu ti2cdh ctrl_clk ctrl_data ti2cstsu 1/fspi_clk tspidh tspiclkh tspiclkl tspidsu ctrl_clk ctrl_data ctrl_ad0_cs tcsl tcsh tcsc tccs ctrl_adr0_cs
analog integrated circuit device data ? freescale semiconductor 11 SGTL5000 electrical characteristics timing diagrams . figure 7. i 2 s interface timing 1/fsclk ti2s_s ti2s_d i2s_sclk i2s_lrclk in slave mode i2s_lrclk in master mode ti2s_h ti2s_d i2s_sclk i2s_din i2s_dout ti2s_s i2s_lrclk 1/flrclk
analog integrated circuit device data ? 12 freescale semiconductor SGTL5000 functional description introduction functional description introduction the SGTL5000 is a low power stereo codec with integrated headphone amplifier. it is designed to provide a complete audio solution for portable products needing linein, mic-in, lineout, headphone-out, and digital i/o. deriving it?s architecture from best in class freescale integrated products that are currently on the market, the SGTL5000 is able to achieve ultra low power with very high performance and functionality, all in one of the smallest footprints available. target markets include portable media players, gps units and smart phones. features such as capless headphone design and usb clocking mode (12 mhz sys_mclk input) help lowe r overall system cost. in summary, the SGTL5000 ac cepts the following inputs: ? line input ? microphone input, with mic bias ? digital i 2 s input in addition, the SGTL5000 supports the following outputs: ? line output ? headphone output ? digital i 2 s output the following digital audio processing is included to allow for product differentiation: ? digital mixer ? freescale surround ? freescale bass enhancement ? tone control, parametric equalizer, or graphic equalizer the SGTL5000 can accept an external standard master clock at a multiple of the sampling frequency (i.e. 256*fs, 385*fs, 512*fs). in addition it can take non-standard frequencies and use the internal pll to derive the audio clocks. the device supports 8.0 khz, 11.025 khz, 12 khz, 16 khz, 22.05 khz, 24 khz, 32 khz, 44.1khz, 48 khz, 96 khz sampling frequencies. functional internal block description system block diagram w/ signal flow and gain map figure 8 shows a block diagram that highlights the signal flow and gain map for the SGTL5000. to guarantee against clipping, it is important that the gain in a signal path in addition to the signal level does not exceed 0 db at any point. figure 8. system block di agram, signal flow and gain mic gain (0db, 20db, 30db, 40db ) mic_in audio switch i2s_din adc i2s_dout mix +6db tone control /geq/peq +12 db bass enhancement +6db surround avc +12db dac dac volume control -90db to 0db headphone volume control -52db to +12db ( chip_ana_hp_ctrl ) hp_out analog gain digital gain analog gain (0 to 22.5db) only gain is shown for the digital audio processing blocks. for complete description please see digital audio processing section. line out volume control ( chip_line_out_vol ) lineout line_in
analog integrated circuit device data ? freescale semiconductor 13 SGTL5000 functional description functional internal block description power the SGTL5000 has a flexible power architecture to allow the system designer to minimize power consumption and maximize performance at the lowest cost. external power supplies the SGTL5000 requires 2 external power supplies: vdda and vddio. an optional third external power supply vddd may be provided externally to achieve lower power. this external vddd power supply is required for new designs. a description for the different power supplies is as follows: ? vdda: this external power supply is used for the internal analog circuitry including adc, dac, line inputs, mic inputs, headphone outputs and reference voltages. vdda supply ranges are shown in maximum ratings . a decoupling cap should be used on vdda, as shown in the typical application diagrams in typical applications . ? vddio: this external power s upply controls the digital i/o levels as well as the output level of line outputs. vddio supply ranges are shown in maximum ratings . a decoupling cap should be used on vddio as shown in the typical application diagrams in typical applications . note that if vdda and vddi o are derived from the same voltage, a single decoupling capacitor can be used to minimize cost. this capacitor should be placed closest to vdda. ? vddd: this is a digital power supply that is used for internal digital circuitry. an external vddd power supply is required for new designs. for lowest power, this supply can be driven at the lowest specified voltage given in maximum ratings . if an external supply is used for vddd, a decoupling capacitor is recommended, as shown in the typical applications diagram. vddd supply ranges are shown in maximum ratings for when externally driven. if the system drives vddd external ly, an effici ent switching supply should be used or no system power savings is realized. internal power supplies the SGTL5000 has two exposed internal power supplies, vag and charge pump. ? vag is the internal voltage reference for the adc and dac. after startup the voltage of vag should be set to vdda/2 by writing chip_ref_ctrl->vag_val . refer to programming chip powerup and supply configurations . the vag pin should have an ex ternal filter capacitor as shown in the typical application diagram. ? chargepump: this power supply is used for internal analog switches. if vdda or vddio is greater than 2.7 v, this supply is automatically driven from the highest of vddio and vdda. if both vddio and vdda are less than 3.1 v, then the user should turn on the charge pump function to create the char ge pump rail from vddio by writing chip_ana_power-> vddc_chrgpmp_powerup register. refer to programming chip powerup and supply configurations . ? line_out_vag is the line output voltage reference. it should be set to vddio/2 by writing chip_line_out_ctr l->lo_vagcntrl . power schemes the SGTL5000 supports a flexible architecture and allows the system designer to minimize power or maximize bom savings. ? for maximum cost savings, all supplies can be run at the same voltage. ? alternatively for minimum power, the analog and digital supplies can be run at minimum voltage while driving the digital i/o voltage at the voltage needed by the system. ? to save power, independent supplies are provided for line outputs and headphone outputs. this allows for 1vrms line outputs while using minimal headphone power. ? for best power, vdda should be run at the lowest possible voltage required for the maximum headphone output level. for highest performance, vdda should be run at 3.3 v. for most applications a lower voltage can be used for the best performance/power combination. reset the SGTL5000 has an internal reset that is deasserted 8 sys_mclks after all power rails have been brought up. after this time communication can start. see dynamic electrical characteristics . clocking clocking for the SGTL5000 is provided by a system master clock input (sys_mclk). sys_mclk should be synchronous to the sampli ng rate (fs) of the i 2 s port. alternatively any clock between 8.0 and 27 mhz can be provided on sys_mclk and the SGTL5000 can use an internal pll to derive all internal and i 2 s clocks. this allows the system to use an avai lable clock such as 12 mhz (common usb clock) for sys_mclk to reduce overall system costs. synchronous sys_mclk input the SGTL5000 supports various combinations of sys_mclk frequency and sampling frequency as shown in table 8 . using a synchronous sys_mclk allows for lower power as the internal pll is not used.
analog integrated circuit device data ? 14 freescale semiconductor SGTL5000 functional description functional internal block description using the pll - asynch ronous sys_mclk input an integrated pll is provided in the SGTL5000 that allows any clock from 8.0 to 27 mhz to be connec ted to sys_mclk. this can help save system co sts, as a clock available elsewhere in the system can be used to derive all audio clocks using the internal pll. in this case, the clock input to sys_mclk can be asynchro nous with the sampling frequency needed in the system. for example, a 12 mhz clock from the system processor could be used as the clock input to the SGTL5000. three register fields need to be configured to properly use the pll. they are chip_pll_ctrl->int_divisor , chip_pll_ctrl->frac_divisor and chip_clk_top_ctrl->input_freq_div2 . figure 9 shows a flowchart that shows how to determine the values to program in the register fields. figure 9. pll programming flowchart for example, when a 12 mhz digital signal is placed on mclk, for a 48 khz frame clock chip_clk_top_ctrl-> input_freq_div2 = 0 // sys_mclk < 17 mhz chip_pll_ctrl->int_divisor = floor (196.608 mhz/12 mhz) = 16 (decimal) chip_pll_ctrl->frac_divisor = ((196.608 mhz/ 12 mhz) - 16) * 2048 = 786 (decimal) refer to pll programming pll configuration . audio switch (sourc e select switch) the audio switch is the central routing block that controls the signal flow from input to output. any single input can be routed to any single or multiple outputs. any signal can be routed to the digital audio processor (dap). the output of the dap ( an input to the audio switch) can in turn be routed to any physical output. the output of the dap can not be routed into itself. refer to digital audio processing , for dap information and configuration. it should be noted that the analog bypass from line input to headphone output does not go through the audio switch. table 8. synchronous mclk rates and sampling frequencies clock supported rates units system master clock (sys_mclk) 256, 384, 512 fs sampling frequency (fs) 8, 11.025, 12, 16, 22.05, 24, 32, 44.1, 48, 96 (6) khz notes 6. for a sampling frequency of 96 khz, only 256 fs sys_mclk is supported sys_mclk>17mhz? chip_clk_top _ctrl->input_freq_div2 = 1 pll_input_freq = sys_mclk/2 sampling frequency = 44.1khz? pll_output_freq=180.6336mhz pll_output_freq=196.608mhz chip_clk_top_ctrl->input_freq_div2 = 0 pll_input_freq = sys_mclk chip_pll_ctrl->int_divisor = floor(pll_output_freq/input_freq chip_pll_ctrl->frac_divisor = ((pll_output_freq/input_freq) - int_divisor) * 2048 no yes no yes
analog integrated circuit device data ? freescale semiconductor 15 SGTL5000 functional description functional internal block description to configure a route, the chip_sss_ctrl register is used. each output from the sour ce select switch has its own register field that is used to sele ct what input is routed to that output. for example, to route the i 2 s digital input through the dap and then out to the dac (headphone) outputs write sss_ctrl->dap_select to 0x1 (selects i2s_in) and sss_ctrl->dac_select to 0x3 (selects dap output). analog input block the analog input block contains a stereo line input and a microphone input with mic bias. either input can be routed to the adc. the line input can also be configured to bypass the codec and be routed directly to the headphone output. line inputs one stereo line input is provided for connection to line sources such as an fm radio or mp3 input. the source should be connected to the left and right line inputs through series couplin g capacitors. the suggested value is shown in the typical application diagram in typical applications . as detailed in adc , the line input can be routed to the adc. the line input can also be routed to the headphone output by writing chip_ana_ctrl->select_hp . this selection bypasses the adc and audio switch and routes the line input directly to the headphone output to enable a very low power pass through. microphone input one mono microphone input is provided for uses such as voice recording. mic bias is provided. the mic bias is programmed with the chip_mic_ctrl ->bias_volt register field. values from 1.25 v to 3.00 v are supported in 0.25 v steps. mic bias should be set less than 200 mv from vdda, e.g. with vdda at 1.70 v, mic bias should be set no greater than 1.50 v. the microphone should be connected through a series coupling capacitor. the suggested value is shown in the typical connection diagram. the microphone has programmable gain through the chip_mic_ctrl->gain register field. values of 0 db, +20 db, +30 db and +40 db are available. adc the SGTL5000 contains an adc, which takes its input from either the line input or a microphone. the register field chip_ana_ctrl->select_adc controls this selection. the output of the adc f eeds the audio switch. the adc has its own analog gain stage that provides 0 to +22.5 db of gain in 1.5 db steps. a bit is available that shifts this range down by 6.0 db to effectively provide -6.0 db to +16.5 db of gain. the adc gain is controlled in the chip_ana_adc_ctrl register. the adc has an available zero cross detect (zcd) that prevents any volume change until a zero-volt crossing of the audio signal is detected. this hel ps in eliminating pop or other audio anomalies. if the adc is to be used, the chip reference bias current should not be set to -50% when in 3.0 v mode. analog outputs the SGTL5000 contains a sing le stereo dac that can be used to drive a headphone output and a line output. the dac receives its input from the audio switch. the headphone output and the line output can be driven at the same time from the dac. the headphone output can also be driven directly by the line input bypassing the adc and dac for a very low power mode of operation. the headphone output is powered by vdda while the line output is powered by vddio. this allows the headphone output to be run at the lowest possible voltage while the line output can still meet line ou tput level requirements. dac the dac output is routed to the headphone and the dedicated line output. the dac output has a digital volume control from -90 db to 0 db in ~0.5 db step sizes. this volume is shared among headphone output and line output. the register chip_dac_vol controls the dac volume. headphone stereo headphone outputs are provided which can be used to drive a headphone load or a line level output. the headphone output has its own independent analog volume control with a volume range of -52 db to +12 db in 0.5 db step sizes. this volume control can be used in addition to the dac volume control. for best performance the dac volume control should be left at 0 db until the headphone is brought to its lowest setting of -52 db. the register chip_ana_hp_ctrl is used to control the headphone volume. the headphone output has an independent mute that is controlled by the register field chip_ana_ctrl- >mute_hp . the line input is routed to the headphone output by writing chip_ana_ctrl->select_hp . this selection bypasses the adc and audio switch and rout es the line input directly to the headphone output to enable a very low power pass through. when the line input is routed to the headphone output, only the headphone analog volume and mute affects the headphone output. the headphone has an available zero cross detect (zcd) which, as previously described, prevents any volume change until a zero-volt crossing of the audio signal is detected. this helps in eliminating pop or other audio anomalies.
analog integrated circuit device data ? 16 freescale semiconductor SGTL5000 functional description functional internal block description line outputs the SGTL5000 contains a stereo line output. the line output has a dedicated gain stage that can be used to adjust the output level. the chip_line_out_vol controls the line level output gain. the line outputs also have a dedicated mute that is controlled by the register field chip_ana_ctrl- >mute_lo. the line out volume is intended as maximum output level adjustment. it is intended to be used to set the maximum output swing. it does not have the range of a typical volume control and does not have a zero cross detect (zcd). however the dac digital volume could be used if volume control is desired.
analog integrated circuit device data ? freescale semiconductor 17 SGTL5000 functional device operation functional internal block description functional device operation power consumption v ddd derived internally at 1.2 v, slave mode except for pll case, 32 ? load on hp, conditions: -100 dbfs signal input, slave mode unless other wise noted, paths tested as indicated, unused paths turned off. digital input & output one i 2 s (digital audio) port is provided which supports the following formats: i 2 s, left justified, right justified, and pcm mode. i 2 s, left justified, and right justified modes i 2 s, left justified and right justified modes are stereo interface formats. the i2s_sclk frequency, i2s_sclk polarity, i2s_din/dout data length, and i2s_lrclk polarity can all be changed through the chip_i2s_ctrl register. for i2s, le ft justified and right justified formats, table 9. power consumption: v dda =1.8 v, v ddio =1.8 v mode current consumption (ma) power (mw) v ddd v dda v ddio playback (i 2 s->dac->headphone) - 2.54 0.9 6.19 playback with dap ((i 2 s->dap->dac->headphone) - 3.59 0.9 8.08 playback/record (i 2 s->dac->headphone, adc->i 2 s) - 3.71 1.10 8.67 record (adc->i 2 s) - 2.29 1.06 6.02 analog playback, codec bypassed (linein->hp) - 1.48 0.89 4.27 standby, all analog power off - 0.019 0.002 0.038 playback with pll (i 2 s->dac->hp) - 3.01 2.17 9.31 table 10. power consumption: v dda =3.3 v, v ddio =3.3 v mode current consumption (ma) power(mw) v ddd v dda v ddio playback (i 2 s->dac->headphone) - 3.45 0.067 11.60 playback with dap ((i 2 s->dap->dac->headphone) - 4.49 0.067 15.03 playback/record (i 2 s->dac->headphone, adc->i 2 s) - 4.67 0.343 16.53 record (adc->i 2 s) - 2.90 0.296 10.56 analog playback, codec bypassed (linein->hp) - 1.91 0.039 6.43 standby, all analog power off - 0.04 0.002 0.139 playback with pll (i 2 s->dac->hp) - 3.92 2.76 22.05
analog integrated circuit device data ? 18 freescale semiconductor SGTL5000 functional device operation functional internal block description the left subframe should always be presented first regardless of the chip_i2s_ctrl->lrpol setting. the i2s_lrclk and i2s_sclk can be programmed as master (driven to an external target) or slave (driven from an external source). when the cl ocks are in slave mode, they must be synchronous to sys_mclk. for this reason the SGTL5000 can only operate in synchronous mode (see clocking ) while in i 2 s slave mode. in master mode, the clocks are synchronous to sys_mclk or the output of th e pll when the part is running in asynchronous mode. figure 10 shows functional examples of different common digital interface formats and their associated register settings. figure 10. i 2 s port supported formats l n l (n-1) l01 l00 r n r (n-1) r01 r00 i2s_lrclk i2s_sclk i2s_din, dout i2s format (n = bit length) chip_i2s0_ctrl field values: (sclkfreq = 0; sclk_inv = 0; dlen = 1; i2s_mode = 0; lralign = 0; lrpol = 0) l n l n l (n-1) l 1 l 0 r n r (n-1) r 1 r 0 i2s_lrclk i2s_sclk i2s_din, dout left justified format (n = bit length) chip_i2s0_ctrl field values: (sclkfreq = 0; sclk_inv = 0; dlen = 1; i2s_mode = 0; lralign = 1; lrpol = 0) l n l (n-1) l n l (n-1) l 0 r n r (n-1) r0 i2s_lrclk i2s_sclk i2s_din, dout right justified format (n = bit length) chip_i2s0_ctrl field values: sclkfreq = 0; sclk_inv = 0; dlen = 1; i2s_mode = 1; lralign = 1; lrpol = 0)
analog integrated circuit device data ? freescale semiconductor 19 SGTL5000 functional device operation functional internal block description pcm mode the i 2 s port can also be configured in pcm mode (also known as dsp mode). this mode is provided to allow connectivity to external devic es such as bluetooth modules. pcm mode differs from other interface formats presented in i2s, left justified, and right justified modes , in that the frame clock (i2s_lrclk) does not represent a different channel when high or low. instead, it is a bit-wide pulse that marks the start of a frame. data is aligned such that the left channel data is immediately fo llowed by right channel data. zero padding is filled in for the remaining bits. the data and frame clock may be configured to clock in on the rising or falling edge of bit clock. pcm format a is a format in which the data word begins one sclk bit following the i2s_lrclk transition, as in i 2 s mode. pcm format b is a format in which the data word begins after the i2s_lrclk transition, as in left justified. in slave mode, the pulse widt h of the i2s_lrclk does not matter. the pulse can range from one cycle high to all but one cycle high. in master mode, it is driven one cycle high. figures 11 shows a functional drawing of the different formats in master mode. figure 11. pcm formats digital audio processing the SGTL5000 contains a digital audio processing block (dap) connected to the source select switch. the digitized signal from the source select switch can be routed into the dap block for audio processing. the dap has the following 5 sub blocks: ? dual input mixer ? freescale surround ? freescale bass enhancement ? 7-band parameter eq / 5-band graphic eq / tone control (only one can be used at a time) ? automatic volume control (avc) the block diagram in figure 12 shows the sequence in which the signal passes through these blocks. l n l (n-1) l 0 r n r (n-1) r 0 i2s_lrclk i2s_sclk i2s_din, dout pcm format a chip_i2s0_ctrl = 0x01f4 (sclkfreq = 1; ms = 1; sclk_inv = 1; dlen = 3; i2s_mode = 2; lralign = 0) l n l (n-1) l 0 r n r (n-1) r 0 r 1 r 1 l n l (n-1) l 0 r n r (n-1) r 0 i2s_lrclk i2s_sclk i2s_din, dout pcm format b chip_i2s0_ctrl = 0x01f6 (sclkfreq = 1; ms = 1; sclk_inv = 1; dlen = 3; i2s_mode = 2; lralign = 1) l n l (n-1) l 0 r n r (n-1) r 0
analog integrated circuit device data ? 20 freescale semiconductor SGTL5000 functional device operation functional internal block description figure 12. digital audio processing block diagram when the dap block is added in the route, it must be enabled separately to get audio through. it is recommended to mute the outputs before enabling/disabling the dap block to avoid any pops or clicks due to discontinuities in the output. refer to digital audio processor configuration for programming examples on how to enable/disable the dap block. each sub-block of the dap can be individually disabled if its processing is not required. the following sections describe the dap sub-blocks and how to configure them. dual input mixer the dual input digital mixer allows for two incoming streams from the source select switch as shown in dap - dual input mixer . figure 13. dap - dual input mixer the dual input mixer can be enabled or configured in a pass-through mode (main channel is passed through without any mixing). when enabled, the volume of the main and mix channels can be independently controlled before they are mixed together. the volume range allowed on each channel is 0% to 200% of the incoming signal level. the default is 100% (same as input signal level) volume on the main input and 0% (muted) on the mix input. refer to dual input mixer for programming examples on how to enable/disable the mixer and also to set the main and mix channel volume. freescale surround freescale surround is a royalty free virtual surround algorithm for stereo or mono in puts. it widens and deepens the sound stage of the music input. automatic volume control (avc) sigmatel surround sigmatel bass enhance 7-band parametric eq 5-band graphic eq tone control from source select swtich to source select swtich dual input mixer set dap_control->dap_en to enable dap block only one of peq/geq/tc can be used at a time each dap sub-block can be configured in a pass -through mode main input mix input dual input mixer automatic volume control (avc) freescale surround freescale bass enhance main channel main channel volume dap_main_chan->vol mix channel volume dap_mix_chan->vol sum mixer output from source select switch from source select switch mix channel to sgtl surround block to freescale surround block
analog integrated circuit device data ? freescale semiconductor 21 SGTL5000 functional device operation functional internal block description the freescale surround can be enabled or configured in pass-through mode (input is passed through without any processing). when enabling the surround, mono or stereo input type must be selected based on the input signal. surround width may be adjusted for the size of the sound stage. refer to freescale surround and freescale surround on/ off for a programming example on how to configure surround width and how to enable/disable surround. freescale bass enhance freescale bass enhance is a ro yalty-free algorithm that enhances natural bass response of the audio. bass enhance extracts bass content from right and left channels, adds bass and mixes this back up with the original signal. an optional complementary high pass filter is provided after the mixer. figure 14. dap- freescale bass enhance the freescale bass enhance can be enabled or configured in pass-through mode (input is passed through without any processing). the cutoff frequency of the low-pass filter (lpf) can be selected based on the speakers frequency response. the cutoff frequency of the low-pass and high-pass filters are selectable between 80 to 225 hz. also, the input signal and bass enhanced signal can be individually adjusted for level before the two signals are mixed. refer to freescale bass enhance and bass enhance on/ off for a programming example on how to configure bass enhance and how to enable/disable this feature. 7-band parametric eq / 5-band graphic eq / tone control one 7-band parametric equa lizer (peq), one 5-band graphic equalizer (geq), and tone control (bass and treble control) blocks are implemen ted as mutually exclusive blocks. only one block can be used at a given time. refer to 7-band parametric eq / 5-band graphic eq / tone control for a programming example that shows how to select the desired eq mode. 7-band parametric eq the 7-band peq allows the designer to compensate for speaker response and to provi de the ability to filter out resonant frequencies caused by the physical system design. the system designer can create cu stom eq presets such as rock, speech, classi cal, etc, which allows users the flexibility to customize their audio. the 7-band peq is implemented using 7 cascaded second order iir filters. all filters are implemented using programmable bi-quad filters. figure 15 shows the transfer function and direct form 1 of t he five coefficient biquadratic filter. sigmatel surround dap_sgtl_surround -> width_control ->select input from dual mixer output to sgtl bass enhance freescale surround to freescale bass enhance bass enhance low pass filter dap_bass_enhance ->cut_off dap_bass_enhance_ctrl ->bass _level dap_bass_enhance_ctrl ->lr_level input (from sgtl surround) high pass filter dap_bass _enhance_ctrl ->cutoff_hpf ->bypass _hpf output (to peq/geq/tc) input (from freescale surround)
analog integrated circuit device data ? 22 freescale semiconductor SGTL5000 functional device operation functional internal block description figure 15. 5-coefficient biquad filter and transfer function if a band is enabled but is not being used (flat response), then a value of 0.5 should be put in b 0 and all other coefficients should be set to 0.0. note that the coefficients must be converted to hex values before writing to the registers. by default, all the filters are lo aded with coefficients to give a flat response. in order to create eq pres ets such as rock, speech, classical, etc, the co efficients must be ca lculated, converted to 20-bit hex values and writte n to the registers. note that coefficients are sample-rate dependent and separate coefficients must be generated for different sample rates. please contact freescale for assistance with generating the coefficients. refer to 7-band peq preset selection for a programming example that shows how load th e filter coefficients when the end-user changes the preset. peq can be disabled (pass-through mode) by writing 0 to dap_audio_eq->en bits. 5-band graphic eq the 5-band graphic equalizer is implemented using 5 parallel second order iir filter s. all filters are implemented using biquad filters whose coeffi cients are programmed to set the bands at a specific freque ncy. the geq bands are fixed at 115 hz, 330 hz, 990 hz, 3000 hz, and 9900 hz. the volume on each band is independently adjustable in the range of +12 db to -11.75 db in 0.25 db steps. refer to 5-band geq volume change for a programming example that shows how to change the geq volume. tone control tone control comprises treble and bass controls. the tone control is implemented as one 2nd order low pass filter (bass) and one 2nd order high pass filter (treble). refer to tone control - bass and treble change for a programming example that shows how to change bass and treble values. automatic volume control (avc) an automatic volume control (avc) block is provided to reduce loud signals and amplify low level signals for easier listening. the avc is designed to compress audio when the measured level is above the programmed threshold or to expand the audio to the programmed threshold when the measured audio is below the threshold. the threshold level is programmable with an allowed range of 0 to -96 db. figure 16 shows the avc block diagram and controls. 1 ? z 1 ? 1 ? 1 ? ? x(z) h(z)x(z) b 0 b 1 b 2 -a 1 -a 2 2 2 1 1 2 2 1 1 0 1 ) ( ? ? ? ? ? ? ? ? ? z a z a z b z b b z h direct form 1
analog integrated circuit device data ? freescale semiconductor 23 SGTL5000 functional device operation functional internal block description figure 16. dap avc block diagram when the measured audio level is below threshold, the avc can apply a maximum gain of up to 12 db. the maximum gain can be selected, either 0, 6, or 12 db. when the maximum gain is set to 0 db the avc acts as a limiter. in this case the avc only takes effect when the signal level is above the threshold. the rate at which the incoming signal is attenuated down to the threshold is called the at tack rate. too high of an attack causes an unnatural sound as the input signal may be distorted. too low of an atta ck may cause saturation of the output as the incoming signal is not compressed quickly enough. the attack rate is programmable with allowed range of 0.05 db/s to 200 db/s. when the signal is below the threshold, avc adjusts the volume up until either the threshold or the maximum gain is reached. the rate at which this volume is changed is called the decay rate. the decay rate is programmable with allowed range of 0.8 db/s to 3200 db/s. it is desirable to use very slow decay rate to avoid any distortion in the signal and prevent the avc from entering a continuous attack-decay loop. refer to automatic volume control (avc) and automatic volume control (avc) on/off for a programming example that shows how to configure avc and how to enable/disable avc respectively. control the SGTL5000 supports both i 2 c and spi control modes (note that spi is not support ed in the 20 qfn part). the ctrl_mode pin chooses which mode is used. when ctrl_mode is tied to ground, the control mode is i 2 c. when ctrl_mode is tied to vddio, the control mode is spi. regardless of the mode, the control interface is used for all communication with the sg tl5000 including startup configuration, rout ing, volume, etc. i 2 c the i 2 c port is implemented according to the i 2 c specification v2.0. the i 2 c interface is used to read and write all registers. for the 32 qfn version of the SGTL5000, the i 2 c device address is 0n01010(r/w) where n is determined by ctrl_adr0_cs and r/w is the read/write bit from the i 2 c protocol. for the 20 qfn version of the SGTL5000 the i 2 c address is always 0001010(r/w). the SGTL5000 is always the slave on all transactions, which means that an external master always drives ctrl_clk. in general, an i 2 c transaction looks like the following. all locations are accessed with a 16 bit address. each location is 16 bits wide. example i 2 c write ? start condition ? device address with the r/w bit cleared to indicate write ? send two bytes for the 16 bit register address (most significant byte first) ? send two bytes for the 16 bits of data to be written to the register (most significant byte first) ? stop condition example i 2 c read ? start condition ? device address with the r/w bit cleared to indicate write ? send two bytes for the 16 bit register address (most significant byte first) ? stop condition followed by start condition (or a single restart condition) ? device address with the r/w bit set to indicate read ? read two bytes from the addressed register (most significant byte first) ? stop condition figure 17 shows the functional i 2 c timing diagram. threshold level compare volume control if < threshold decay (0.05db/s to ~200db/s) dap_avc_decay dap_avc_threshold -> max_gain if > threshold attack (0.8db/s to ~3200db/s) dap_avc_attack input from dual input mixer dap_avc_threshold output to sgtl surround output to freescale surround
analog integrated circuit device data ? 24 freescale semiconductor SGTL5000 functional device operation functional internal block description figure 17. functional i 2 c diagram the protocol has an auto in crement feature. instead of sending the stop condition after two bytes of data, the master may continue to send data byte pairs for writing, or it may send extra clocks for reading data byte pairs. in either case, the access address is incremented after every two bytes of data. a start or stop condition from the i 2 c master interrupts the current command. for reads, unless a new address is written, a new start condition with r/w=0 reads from the current address and continues to auto increment. the following diagrams describe the different access formats. the gray fields are from the i 2 c master, and the white fields are the SGTL5000 responses. data [n] corresponds to the data read from the address sent, data[n+1] is the data from the next register, and so on. s = start condition sr = restart condition a = ack n = nack p = stop condition spi serial peripheral interface (spi) is a communications protocol supported by the sgtl 5000 (not supported in the 20 qfn package). the SGTL5000 is always a slave. the ctrl_adr0_cs is used as the slave select (ss) when the master wants to select the SGTL5000 for communication. ctrl_clk is connected to master?s sclk and ctrl_data is connected to master?s mosi line. the part only supports spi write operations and does not support read operations. figure 18 shows the functional timing diagram of the spi communication protocol as supported by the SGTL5000 chip. note that on the rising edge of the ss, the chip latches to the previous 32 bits of data. it in terprets the latest 16-bits as register value and the 16-bits preceding it as register address. i2c address a15 a8 a7 a0 d15 d 8 d7 d0 r/ w ac k ac k ac k ack ack start condition stop condition table 11. write single location s device address w (0) a addr byte 1 a addr byte 0 a data byte 1 a data byte 0 a p table 12. write auto increment s device address w (0) a start addr byte 1 a start addr byte 0 a data [n] byte 1 a data [n] byte 0 a data [n+1] byte 1 a data [n+1] byte 0 a p table 13. read single location s device address w (0) a addr byte 1 a addr byte 0 a sr device address r (1) adata byte 1 adata byte 0 n p table 14. read auto increment s device address w (0) a start addr byte 1 a start addr byte 0 a sr device address r (1) adata [n] byte 1 adata [n] byte 0 adata [n+1] byte 1 adata [n+1] byte 0 n p table 15. read continuing auto increment s device address ra data [n+2] byte 1 adata [n+2] byte 0 adata [n+3] byte 1 adata [n+3] byte 0 n p
analog integrated circuit device data ? freescale semiconductor 25 SGTL5000 functional device operation functional internal block description figure 18. functional timing diagram of spi protocol ss sck addr 15 addr 14 addr 8 addr 7 addr 6 addr 0 31 15 mosi val 15 val 14 val 8 val 7 val 6 val 0 23 70 16-bits register address 16-bits register value on rising edge of ss, latch the last 32 bits of data
analog integrated circuit device data ? 26 freescale semiconductor SGTL5000 functional device operation programming examples programming examples this section provides programming examples showing how to configure the chip. the registers can be written/read by using i 2 c communication protocol. the chip also supports spi communication protocol (not supported in the 20 qfn package), but only register write operation is supported. prototype for reading and writing a register the generic register read write prototype is used throughout this section, as shown by the following. the i 2 c or spi implementation is specific to the i 2 c/spi hardware used in the system. // this prototype writes a value to the entire register. all // bit-fields of the r egister will be written. write register registervalue // this prototype writes a value only to the bit-field specified. // in the actual implementation , the other bit-fields should be // masked to prevent them from being written. also, the // actual implementation should left-shift the bitfieldvalue // by appropriate number to match the starting bit location of // the bitfield. modify register -> bitfield, bitfieldvalue //bitfield location // example implementation // modify dap_en (bit 0) bit to value 1 to enable dap block modify(dap_control_reg, 0xfffe, 1 << dap_en_startbit); // example implementation of modify void modify(unsigned short usregister, unsigned short usclearmask, unsigned short ussetvalue) { unsigned short usdata; // 1) read current value readregister(usregister, &usdata); // 2) clear out old bits usdata = usdata & usclearmask; // 3) set new bit values usdata = usdata | ussetvalue; // 4) write out new value created writeregister(usregister, usdata); } chip configuration all outputs (lineout, hp_out, i2s_out) are muted by default on power up. to avoi d any pops/clicks, the outputs should remain muted during these chip configuration steps. refer to volume control for volume and mute control. initialization chip powerup and supply configurations after the power supplies for the chip are turned on, the following initialization sequence should be followed. please note that certain steps may be optional or different values may need to be written based on the power supply voltage used and desired configuration. the initialization sequence below assumes vddio = 3.3 v and vdda = 1.8 v. //--------------- power supply configuration---------------- // note: this next 2 write calls is needed only if vddd is // internally driven by the chip // configure vddd level to 1.2v (bits 3:0) write chip_linreg_ctrl 0x0008 // power up internal linear regulator (set bit 9) write chip_ana_power 0x7260 // note: this next write call is needed only if vddd is // externally driven // turn off startup power supplies to save power (clear bit 12 and 13) write chip_ana_power 0x4260 // note: the next write calls is needed only if both vdda and // vddio power supplies are less than 3.1v. // enable the internal oscillator for the charge pump (set bit 11) write chip_clk_top_ctrl 0x0800 // enable charge pump (set bit 11) write chip_ana_power 0x4a60 // note: the next modify call is only needed if both vdda and // vddio are greater than 3.1 v // configure the charge pump to use the vddio rail (set bit 5 and bit 6) write chip_linreg_ctrl 0x006c //---- reference voltage and bias current configuration---- // note: the value written in the next 2 write calls is dependent // on the vdda voltage value. // set ground, adc, dac reference voltage (bits 8:4). the value should // be set to vdda/2. this example assumes vdda = 1.8 v. vdda/2 = 0.9 v. // the bias current should be set to 50% of the nominal value (bits 3:1) write chip_ref_ctrl 0x004e // set lineout reference voltage to vddio/2 (1.65 v) (bits 5:0) and bias current (bits 11:8) to the recommended value of 0.36 ma for 10 kohm load with 1.0 nf capacitance write chip_line_out_ctrl 0x0322 //------------other analog block configurations-------------- // configure slow ramp up rate to minimize pop (bit 0) write chip_ref_ctrl 0x004f // enable short detect mode for headphone left/right // and center channel and set short detect current trip level // to 75 ma write chip_short_ctrl 0x1106 // enable zero-cross detect if needed for hp_out (bit 5) and adc (bit 1)
analog integrated circuit device data ? freescale semiconductor 27 SGTL5000 functional device operation programming examples write chip_ana_ctrl 0x0133 //------------power up inputs/outputs/digital blocks--------- // power up lineout, hp, adc, dac write chip_ana_power 0x6aff // power up desired digital blocks // i2s_in (bit 0), i2s_out (bit 1), dap (bit 4), dac (bit 5), // adc (bit 6) are powered on write chip_dig_power 0x0073 //----------------set lineout volume level------------------- // set the lineout volume level based on voltage reference (vag) // values using this formula // value = (int)(40*log(vag_val/lo_vagcntrl) + 15) // assuming vag_val and lo_vagcntrl is set to 0.9 v and 1.65 v respectively, the // left lo vol (bits 12:8) and right lo volume (bits 4:0) value should be set // to 5 write chip_line_out_vol 0x0505 system mclk and sample clock // configure sys_fs clock to 48 khz // configure mclk_freq to 256*fs modify chip_clk_ctrl->sys_fs 0x0002 // bits 3:2 modify chip_clk_ctrl->mclk_freq 0x0000 // bits 1:0 // configure the i 2 s clocks in master mode // note: i 2 s lrclk is same as the system sample clock modify chip_i2s_ctrl->ms 0x0001 // bit 7 pll configuration these programming steps are needed only when the pll is used. refer to using the pll - asynchronous sys_mclk input for details on when to use the pll. to avoid any pops/clicks, the outputs should be muted during these chip configuration steps. refer to volume control for volume and mute control. // power up the pll modify chip_ana_power-> pll_powerup 0x0001 // bit 10 modify chip_ana_power-> vcoamp_powerup 0x0001 // bit 8 // note: this step is requir ed only when the external sys_mclk // is above 17 mhz. in this case the external sys_mclk clock // must be divided by 2 modify chip_clk_top_ctrl->input_freq_div2 0x0001 // bit 3 sys_mclk_input_freq = sys_mclk_input_freq/2; // pll output frequency is different based on the sample clock // rate used. if (sys_fs_rate == 44.1 khz) pll_output_freq = 180.6336 mhz else pll_output_freq = 196.608 mhz // set the pll dividers int_divisor = floor(pll_output_freq/sys_mclk_input_freq) frac_divisor = ((pll_output_freq/sys_mclk_input_freq) - int_divisor)*2048 modify chip_pll_ctrl->int_divisor int_divisor // bits 15:11 modify chip_pll_ctrl->frac_di visor frac_divisor // bits 10:0 input/output routing to avoid any pops/clicks, t he outputs should be muted during these chip configuration steps. refer to volume control for volume and mute control. a few example routes are shown below: // example 1: i2s_in -> dap -> dac -> lineout, hp_out // route i2s_in to dap modify chip_sss_ctrl->dap_select 0x0001 // bits 7:6 // route dap to dac modify chip_sss_ctrl->dac_select 0x0003 // bits 5:4 // select dac as the input to hp_out modify chip_ana_ctrl->select_hp 0x0000 // bit 6 // example 2: mic_in -> adc -> i2s_out // set adc input to mic_in modify chip_ana_ctrl->select_adc 0x0000 // bit 2 // route adc to i2s_out modify chip_sss_ctrl->i2s_select 0x0000 // bits 1:0 // example 3: linein -> hp_out // select linein as the input to hp_out modify chip_ana_ctrl->select_hp 0x0001 // bit 6 digital audio processor configuration to avoid any pops/clicks, t he outputs should be muted during these chip configuration steps. refer to volume control for volume and mute control. // enable dap block // note: dap will be in a pass-through mode if none of dap // sub-blocks are enabled. modify dap_control->dap_en 0x0001 // bit 0 dual input mixer these programming steps are needed only if dual input mixer feature is used. // enable dual input mixer modify dap_control->mix_en 0x0001 // bit 4 // note: this example assumes mix level of main and mix // channels as 100% and 50% respectively // configure main channel volume to 100% (no change from input // level) write dap_main_chan 0x4000 // configure mix channel volume to 50% (attenuate the mix // input level by half) write dap_mix_chan 0x4000 freescale surround the freescale surround on/off function is typically controlled by the end-user. end-user driven programming steps are shown in end-user driven chip configuration . the default width_control of 4 should be appropriate for most applications. this optional programming step shows how to configure a different width value.
analog integrated circuit device data ? 28 freescale semiconductor SGTL5000 functional device operation programming examples // configure the surround width // (0x0 = least width, 0x7 = most width). this example shows // a width setting of 5 modify dap_sgtl_surround->width_control 0x0005 // bits 6:4 freescale bass enhance the freescale bass enhance on/off function is typically controlled by the end-user. end-user driven programming steps are shown in end-user driven chip configuration . the default lr_level value of 0x0005 results in no change in the input signal level and bass_l evel value of 0x001f adds some harmonic boost to the main signal. the default settings should work for most applications. this optional programming step shows how to configure a different value. // gain up the input signal level modify dap_bass_enhance_ctrl->lr_level 0x0002 // bits 7:4 // add harmonic boost modify dap_bass_enhance_ctrl->bass_level 0x003f); // bits 6:0 7-band parametric eq / 5-band graphic eq / tone control only one audio eq block can be used at a given time. the pseudocode in this section shows how to select each block. some parameters of the audio eq are typically controlled by the end-user. end-user driven programming steps are shown in end-user driven chip configuration . // 7-band peq mode // select 7-band peq mode and enable 7 peq filters write dap_audio_eq 0x0001 write dap_peq 0x0007 // tone control mode write dap_audio_eq 0x0002 // 5-band geq mode write dap_audio_eq 0x0003 automatic volume control (avc) the avc on/off function is ty pically controlled by the end- user. end-user driven programming steps are shown in end- user driven chip configuration . the default configuration of t he avc should work for most applications. however, the following example shows how to change the configuration if needed. // configure threshold to -18db write dap_avc_threshold 0x0a40 // configure attack rate to 16db/s write dap_avc_attack 0x0014 // configure decay rate to 2db/s write dap_avc_decay 0x0028 i 2 s configuration by default the i 2 s port on the chip is configured for 24-bits of data in i 2 s format with sclk set for 64*fs. this can be modified by setting various bit-fields in the chip_i2s_ctrl register. volume control the outputs should be unmuted af ter all the configuration is complete. //---------------- input volume control--------------------- // configure adc left and right analog volume to desired default. // example shows volume of 0db write chip_ana_adc_ctrl 0x0000 // configure mic gain if needed. example shows gain of 20db modify chip_mic_ctrl->gain 0x0001 // bits 1:0 //---------------- volume and mute control--------------------- // configure hp_out left and right volume to minimum, unmute // hp_out and ramp the volume up to desired volume. write chip_ana_hp_ctrl 0x7f7f modify chip_ana_ctrl->mute_hp 0x0000 // bit 4 // code assumes that left and right volumes are set to same value // so it only uses the left volume for the calculations uscurrentvolleft = 0x7f; usnewvolleft = usnewvol & 0xff; usnumsteps = usnewvolleft - uscurrentvolleft; if (usnumsteps == 0) return; // ramp up for (int i = 0; i < usnumsteps; i++) { ++uscurrentvolleft; uscurrentvol = (uscurrentvolleft << 8) | (uscurrentvolleft); write chip_ana_hp_ctrl uscurrentvol; } // lineout and dac volume control modify chip_ana_ctrl->mute_lo 0x0000 // bit 8 // configure dac left and right digital volume. example shows // volume of 0db write chip_dac_vol 0x3c3c modify chip_adcdac_ctrl ->dac_mute_left 0x0000 // bit 2 modify chip_adcdac_ctrl->dac_mute_right 0x0000 // bit 3 // unmute adc modify chip_ana_ctrl->mute_adc 0x0000 // bit 0
analog integrated circuit device data ? freescale semiconductor 29 SGTL5000 functional device operation programming examples end-user driven chip configuration end-users control features like volume up/down, and audio eq parameters such as bass and treble. this requires programming the chip without introducin g any pops/clicks or any other disturbance to the output. this section shows examples on how to pr ogram these features. volume and mute control refer to volume control for examples on how to program volume when end-user changes the volume or mutes/ unmutes the output. note that the dac volume ramp is automatically handled by the chip. 7-band peq pr eset selection this programming example shows how to load the filter coefficients when the end-user changes peq presets such as rock, speech , classical etc. // load the 5 coefficients for each band and write them to // appropriate filter address. repeat this for all enabled // filters (this example shows 7 filters) for (i = 0; i < 7; i++) { // note that each 20-bit coeffici ent is broken into 16-bit msb // (unsigned short usxxmsb) and 4-bit lsb (unsigned short // usxxlsb) write dap_coef_wr_b0_lsb usb0msb[i] write dap_coef_wr_b0_msb usb0lsb[i] write dap_coef_wr_b1_lsb usb1msb[i] write dap_coef_wr_b1_msb usb1lsb[i] write dap_coef_wr_b2_lsb usb2msb[i] write dap_coef_wr_b2_msb usb2lsb[i] write dap_coef_wr_a1_lsb usa1msb[i] write dap_coef_wr_a1_msb usa1lsb[i] write dap_coef_wr_a2_lsb usa2msb[i] write dap_coef_wr_a2_msb usa2lsb[i] // set the index of the filter (bits 7:0) and load the // coefficients modify dap_filter_coef_access->index (0x0101 + i) // bit 8 } 5-band geq volume change this programming example shows how to program the geq volume when end-user changes the volume on any of the 5 bands. geq volume should be ramped in 0.5 db steps in order to avoid any pops. the example assumes that volume is ramped on band 0. other bands can be programmed similarly. // read current volume set on band 0 uscurrentvol = read dap_audio_eq_bass_band0 // convert the new volume to hex value usnewvol = 4*dnewvoldb + 47; // calculate the number of steps usnumsteps = abs(usnewvol - uscurrentvol); if (usnumsteps == 0) return; for (int i = 0; i++; usnumsteps) { if (usnewvol > uscurrentvol) ++uscurrentvol; else --uscurrentvol; write dap_audio_eq_bass_band0 uscurrentvol; } tone control - bass and treble change this programming example shows how to program the tone control bass and treble when end-user changes it on the fly. tone control bass and treble volume should be ramped in 0.5 db steps in order to avoid any pops. the example assumes that treble is changed to a new value. bass can be programmed similarly. // read current treble value uscurrentval = read dap_audio_eq_treble_band4 // convert the new treble value to hex value usnewvol = 4*dnewvaldb + 47; // calculate the number of steps usnumsteps = abs(usnewval - uscurrentval); if (usnumsteps == 0) return; for (int i = 0; i++; usnumsteps) { if (usnewval > uscurrentval) ++uscurrentval; else --uscurrentval; write dap_audio_eq_tre ble_band4 uscurrentval; } freescale surround on/off this programming example shows how to program the surround when end-user turns it on/off on their device. the surround width should be ramped up to highest value before enabling/disabling the surround to avoid any pops. // read current surround width value // width_control bits 6:4 usoriginalval = (read dap_sgtl_surround >> 4) && 0x0003; usnextval = usoriginalval; // ramp up the width to maximum value of 7 for (int i = 0; i++; (7 - usoriginalval) { ++usnextval; modify dap_sgtl_surround->width_control usnextval; } // enable (to disable, write 0x0000) surround
analog integrated circuit device data ? 30 freescale semiconductor SGTL5000 functional device operation programming examples // select bits 1:0 modify dap_sgtl_surround->select 0x0003; // ramp down the width to original value for (int i = 0; i++; (7 - usoriginalval) { --usnextval; modify dap_sgtl_surround->width_control usnextval; } bass enhance on/off this programming example shows how to program the bass enhance on/off when end-user turns it on/off on their device. the bass level should be ramped down to the lowest bass before bass enhance feature is turned on/off. // read current bass level value // bass_level bits 6:0 usoriginalval = read dap_bass_enhance_ctrl && 0x007f; usnextval = usoriginalval; // ramp bass level to lowest bass (lowest bass = 0x007f) usnumsteps = abs(0x007f - usoriginalval); for (int i = 0; i++; usnumsteps) { ++usnextval; modify dap_bass_enhance_ctrl->bass_level usnextval; } // enable (to disable, write 0x0000) bass enhance // en bit 0 modify dap_bass_enhance->en 0x0001; // ramp bass level back to original value for (int i = 0; i++; usnumsteps) { --usnextval; modify dap_bass_enhance_ctrl->bass_level usnextval; } automatic volume co ntrol (avc) on/off this programming example shows how to program the avc on/off when end-user turns it on/off on their device. // enable avc (to disable, write 0x0000) modify dap_avc_ctrl->en 0x0001 // bit 0 register description chip_id 0x0000 table 16. chip_id 0x0000 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 partid revid bits field rw reset definition 15:8 partid ro 0xa0 SGTL5000 part id 0xa0 - 8 bit identifier for SGTL5000 7:0 revid ro 0x00 SGTL5000 revision id 0xhh - revision number for SGTL5000. table 17. chip_dig_power 0x0002 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd adc_powerup dac_powerup dap_powerup rsvd i2s_out_powerup i2s_in_powerup bits field rw reset definition 15:7 rsvd ro 0x0 reserved 6 adc_powerup rw 0x0 enable/disable the adc block, both digital and analog 0x0 = disable 0x1 = enable
analog integrated circuit device data ? freescale semiconductor 31 SGTL5000 functional device operation programming examples 5 dac_powerup rw 0x0 enable/disable the dac bl ock, both analog and digital 0x0 = disable 0x1 = enable 4 dap_powerup rw 0x0 enable/disable the dap block 0x0 = disable 0x1 = enable 3:2 rsvd rw 0x0 reserved 1 i2s_out_powerup rw 0x0 enable/disable the i2s data output 0x0 = disable 0x1 = enable 0 i2s_in_powerup rw 0x0 enable/disable the i2s data input 0x0 = disable 0x1 = enable table 18. chip_clk_ctrl 0x0004 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd rate_mode sys_fs mclk_freq bits field rw reset definition 15:6 rsvd ro 0x0 reserved 5:4 rate_mode rw 0x0 sets the sample rate mode. mclk_freq is stil l specified relative to the rate in sys_fs 0x0 = sys_fs specifies the rate 0x1 = rate is 1/2 of the sys_fs rate 0x2 = rate is 1/4 of the sys_fs rate 0x3 = rate is 1/6 of the sys_fs rate 3:2 sys_fs rw 0x2 sets the internal system sample rate 0x0 = 32 khz 0x1 = 44.1 khz 0x2 = 48 khz 0x3 = 96 khz 1:0 mclk_freq rw 0x0 identifies incoming sys_mclk frequency and if the pll should be used 0x0 = 256*fs 0x1 = 384*fs 0x2 = 512*fs 0x3 = use pll the 0x3 (use pll) setting must be used if t he sys_mclk is not a standard multiple of fs (256, 384, or 512). this setting can also be used if sys_mclk is a standard multiple of fs. before this field is set to 0x3 (use pll), the pll must be powered up by setting chip_ana_power->pll_powerup and chip_ana_power- >vcoamp_powerup. also, the pll dividers mu st be calculated based on the external mclk rate and chip_pll_ctrl register must be set (see chip_pll_ctrl register description details on how to calculate the divisors). bits field rw reset definition
analog integrated circuit device data ? 32 freescale semiconductor SGTL5000 functional device operation programming examples table 19. chip_i2s_ctrl 0x0006 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd sclkfreq ms sclk_inv dlen i2s_mode lralign lrpol bits field rw reset definition 15:9 rsvd ro 0x0 reserved 8 sclkfreq rw 0x0 sets frequency of i2s_sclk when in master mode (ms=1). when in slave mode (ms=0), this field must be set appropriately to match sclk input rate. 0x0 = 64fs 0x1 = 32fs - not supported for rj mode (i2s_mode = 1) 7 ms rw 0x0 configures master or slave of i2s_lrclk and i2s_sclk. 0x0 = slave: i2s_lrclk and i2s_sclk are inputs 0x1 = master: i2s_lrclk and i2s_sclk are outputs note: if the pll is used (chip_clk_ctrl->mclk_freq==0x3), the SGTL5000 must be a master of the i 2 s port (ms==1) 6 sclk_inv rw 0x0 sets the edge that data (input and output) is clocked in on for i2s_sclk 0x0 = data is valid on rising edge of i2s_sclk 0x1 = data is valid on falling edge of i2s_sclk 5:4 dlen rw 0x1 i 2 s data length 0x0 = 32 bits (only valid when sclkfreq=0), not valid for right justified mode 0x1 = 24 bits (only valid when sclkfreq=0) 0x2 = 20 bits 0x3 = 16 bits 3:2 i2s_mode rw 0x0 sets the mode for the i 2 s port 0x0 = i 2 s mode or left justified (use lralign to select) 0x1 = right justified mode 0x2 = pcm format a/b 0x3 = reserved 1 lralign rw 0x0 i2s_lrclk alignment to data word. not used for right justified mode 0x0 = data word starts 1 i2s_sclk delay after i2s_lrclk transition (i 2 s format, pcm format a) 0x1 = data word starts after i2s_lrclk transition (left justified format, pcm format b) 0 lrpol rw 0x0 i2s_lrclk polarity when data is presented. 0x0 = i2s_lrclk = 0 - left, 1 - right 1x0 = i2s_lrclk = 0 - right, 1 - left the left subframe should be presented firs t regardless of the setting of lrpol.
analog integrated circuit device data ? freescale semiconductor 33 SGTL5000 functional device operation programming examples table 20. chip_sss_ ctrl 0x000a 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd dap_mix_lrswap dap_lrswap dac_lrswap rsvd i2s_lrswap dap_mix_select dap_select dac_select rsvd i2s_select bits field rw reset definition 15 rsvd rw 0x0 reserved 14 dap_mix_lrswap rw 0x0 dap mixer input swap 0x0 = normal operation 0x1 = left and right channels for the dap mixer input are swapped. 13 dap_lrswap rw 0x0 dap input swap 0x0 = normal operation 0x1 = left and right channels for the dap input are swapped 12 dac_lrswap rw 0x0 dac input swap 0x0 = normal operation 0x1 = left and right channels for the dac are swapped 11 rsvd rw 0x0 reserved 10 i2s_lrswap rw 0x0 i2s_dout swap 0x0 = normal operation 0x1 = left and right channels for the i2s_dout are swapped 9:8 dap_mix_select rw 0x0 select data source for dap mixer 0x0 = adc 0x1 = i2s_in 0x2 = reserved 0x3 = reserved 7:6 dap_select rw 0x0 select data source for dap 0x0 = adc 0x1 = i2s_in 0x2 = reserved 0x3 = reserved 5:4 dac_select rw 0x1 select data source for dac 0x0 = adc 0x1 = i2s_in 0x2 = reserved 0x3 = dap 3:2 rsvd rw 0x0 reserved 1:0 i2s_select wo 0x0 select data source for i2s_dout 0x0 = adc 0x1 = i2s_in 0x2 = reserved 0x3 = dap
analog integrated circuit device data ? 34 freescale semiconductor SGTL5000 functional device operation programming examples table 21. chip_adcdac_ctrl 0x000e 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd vol_busy_dac_right vol_busy_dac_left rsvd vol_ramp_en vol_expo_ramp rsvd dac_mute_right dac_mute_left adc_hpf_freeze adc_hpf_bypass bits field rw reset definition 15:14 rsvd ro 0x0 reserved 13 vol_busy_dac_rig ht ro 0x0 volume busy dac right 0x0 = ready 0x1 = busy - this indicate s the channel has not reached its programmed volume/mute level 12 vol_busy_dac_lef t ro 0x0 volume busy dac left 0x0 = ready 0x1 = busy - this indicate s the channel has not reached its programmed volume/mute level 11:10 rsvd ro 0x0 reserved 9 vol_ramp_en rw 0x1 volume ramp enable 0x0 = disables volume ramp. new volume settings take immediate effect without a ramp 0x1 = enables volume ramp this field affects dac_vol. the volume ramp effects both volume settings and mute. when set to 1 a soft mute is enabled. 8 vol_expo_ramp rw 0x0 exponential volume ramp enable 0x0 = linear ramp over top 4 volume octaves 0x1 = exponential ramp over full volume range this bit only takes effect if vol_ramp_en is 1. 7:4 rsvd rw 0x0 reserved 3 dac_mute_right rw 0x1 dac right mute 0x0 = unmute 0x1 = muted if vol_ramp_en = 1, this is a soft mute. 2 dac_mute_left rw 0x1 dac left mute 0x0 = unmute 0x1 = muted if vol_ramp_en = 1, this is a soft mute. 1 adc_hpf_freeze rw 0x0 adc high pass filter freeze 0x0 = normal operation 0x1 = freeze the adc high-pass filter offset register. the offset continues to be subtracted from the adc data stream. 0 adc_hpf_bypass rw 0x0 adc high pass filter bypass 0x0 = normal operation 0x1 = bypassed and offset not updated
analog integrated circuit device data ? freescale semiconductor 35 SGTL5000 functional device operation programming examples table 22. chip_dac_vol 0x0010 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 dac_vol_right dac_vol_left bits field rw reset definition 15:8 dac_vol_right rw 0x3c dac right channel volume set the right channel dac volume with 0.5017 db steps from 0 to -90 db 0x3b and less = reserved 0x3c = 0 db 0x3d = -0.5 db 0xf0 = -90 db 0xfc and greater = muted if vol_ramp_en = 1, there is an automatic ramp to the new volume setting. 7:0 dac_vol_left rw 0x3c dac left channel volume set the left channel dac volume with 0.5017 db steps from 0 to -90 db 0x3b and less = reserved 0x3c = 0 db 0x3d = -0.5 db 0xf0 = -90 db 0xfc and greater = muted if vol_ramp_en = 1, there is an automatic ramp to the new volume setting. table 23. chip_pad_strength 0x0014 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd i2s_lrclk i2s_sclk i2s_dout ctrl_data ctrl_clk bits field rw reset definition 15:14 rsvd rw 0x0 reserved 9:8 i2s_lrclk rw 0x1 i 2 s lrclk pad drive strength sets drive strength for output pads per the table below. vddio 1.8 v 2.5 v 3.3 v 0x0 = disable 0x1 = 1.66 ma 2.87 ma 4.02 ma 0x2 = 3.33 ma 5.74 ma 8.03 ma 0x3 = 4.99 ma 8.61 ma 12.05 ma 7:6 i2s_sclk rw 0x1 i 2 s sclk pad drive strength sets drive strength for output pads per the table below. vddio 1.8 v 2.5 v 3.3 v 0x0 = disable 0x1 = 1.66 ma 2.87 ma 4.02 ma 0x2 = 3.33 ma 5.74 ma 8.03 ma 0x3 = 4.99 ma 8.61 ma 12.05 ma
analog integrated circuit device data ? 36 freescale semiconductor SGTL5000 functional device operation programming examples 5:4 i2s_dout rw 0x1 i 2 s dout pad drive strength sets drive strength for output pads per the table below. vddio 1.8 v 2.5 v 3.3 v 0x0 = disable 0x1 = 1.66 ma 2.87 ma 4.02 ma 0x2 = 3.33 ma 5.74 ma 8.03 ma 0x3 = 4.99 ma 8.61 ma 12.05 ma 3:2 ctrl_data rw 0x3 i 2 c data pad drive strength sets drive strength for output pads per the table below. vddio 1.8 v 2.5 v 3.3 v 0x0 = disable 0x1 = 1.66 ma 2.87 ma 4.02 ma 0x2 = 3.33 ma 5.74 ma 8.03 ma 0x3 = 4.99 ma 8.61 ma 12.05 ma 1:0 ctrl_clk rw 0x3 i 2 c clk pad drive strength sets drive strength for output pads per the table below. vddio 1.8 v 2.5 v 3.3 v 0x0 = disable 0x1 = 1.66 ma 2.87 ma 4.02 ma 0x2 = 3.33 ma 5.74 ma 8.03 ma 0x3 = 4.99 ma 8.61 ma 12.05 ma table 24. chip_ana_adc_ctrl 0x0020 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd adc_vol_m6db adc_vol_right adc_vol_left bits field rw reset definition 15:9 rsvd ro 0x0 reserved 8 adc_vol_m6db rw 0x0 adc volume range reduction this bit shifts both right and left analog adc volume range down by 6.0 db. 0x0 = no change in adc range 0x1 = adc range reduced by 6.0 db bits field rw reset definition
analog integrated circuit device data ? freescale semiconductor 37 SGTL5000 functional device operation programming examples table 26 is an analog control register that includes mutes, input selects, and zero-cro ss-detectors for the adc, headphone, and lineout. 7:4 adc_vol_right rw 0x0 adc right channel volume right channel analog adc volume control in 1.5.0 db steps. 0x0 = 0 db 0x1 = +1.5 db ... 0xf = +22.5 db this range is -6.0 db to +16.5 db if adc_vol_m6db is set to 1. 3:0 adc_vol_left rw 0x0 adc left channel volume left channel analog adc volume control in 1.5 db steps. 0x0 = 0 db 0x1 = +1.5 db ... 0xf = +22.5 db this range is -6.0 db to +16.5 db if adc_vol_m6db is set to 1. table 25. chip_ana_hp_ctrl 0x0022 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd hp_vol_right rsvd hp_vol_left bits field rw reset definition 15 rsvd ro 0x0 reserved 14:8 hp_vol_right rw 0x18 headphone right channel volume right channel headphone volume control with 0.5 db steps. 0x00 = +12 db 0x01 = +11.5 db 0x18 = 0 db ... 0x7f = -51.5 db 7 rsvd ro 0x0 reserved 6:0 hp_vol_left rw 0x18 headphone left channel volume left channel headphone volume control with 0.5 db steps. 0x00 = +12 db 0x01 = +11.5 db 0x18 = 0 db ... 0x7f = -51.5 db bits field rw reset definition
analog integrated circuit device data ? 38 freescale semiconductor SGTL5000 functional device operation programming examples the table 27, chip_linreg_ctrl 0x0026 register controls the vddd linear regul ator and the charge pump. table 26. 7.0.0.11. chip_ana_ctrl 0x0024 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd mute_lo rsvd select_hp en_zcd_hp mute_hp rsvd select_adc en_zcd_adc mute_adc bits field rw reset definition 15:9 rsvd ro 0x0 reserved 8 mute_lo rw 0x1 lineout mute 0x0 = unmute 0x1 = mute 7 rsvd ro 0x0 reserved 6 select_hp rw 0x0 select the headphone input. 0x0 = dac 0x1 = linein 5 en_zcd_hp rw 0x0 enable the headphone zero cross detector (zcd) 0x0 = hp zcd disabled 0x1 = hp zcd enabled 4 mute_hp rw 0x1 mute the headphone outputs 0x0 = unmute 0x1 = mute 3 rsvd ro 0x0 reserved 2 select_adc rw 0x0 select the adc input. 0x0 = microphone 0x1 = linein 1 en_zcd_adc rw 0x0 enable the adc analog zero cross detector (zcd) 0x0 = adc zcd disabled 0x1 = adc zcd enabled 0 mute_adc rw 0x1 mute the adc analog volume 0x0 = unmute 0x1 = mute
analog integrated circuit device data ? freescale semiconductor 39 SGTL5000 functional device operation programming examples the table 28, chip_ref_ctrl 0x0028 register controls the bandgap reference bias voltage and currents. table 27. chip_linreg_ctrl 0x0026 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd vddc_man_assn vddc_assn_ovrd rsvd d_programming bits field rw reset definition 15:7 rsvd ro 0x0 reserved 6 vddc_man_assn rw 0x0 determines chargepum p source when vddc_assn_ovrd is set. 0x0 = vdda 0x1 = vddio 5 vddc_assn_ovrd rw 0x0 charge pump source assignment override 0x0 = charge pump source is automatica lly assigned based on higher of vdda and vddio 0x1 = the source of charge pump is manually assigned by vddc_man_assn if vddio and vdda are both the same and greater than 3.1 v, vddc_assn_ovrd and vddc_man_assn should be used to manually assign vddio as the source for charge pump. 4 rsvd rw 0x0 reserved 3:0 d_programming rw 0x0 sets the vddd linear regulator output voltage in 50 mv steps. must clear the linreg_simple_powerup and startup_po werup bits in the 0x0030 register after power-up, for this setting to produce the proper vddd voltage. 0x0 = 1.60 0xf = 0.85 table 28. chip_ref_ctrl 0x0028 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd vag_val bias_ctrl small_pop bits field rw reset definition 15:9 rsvd ro 0x0 reserved 8:4 vag_val rw 0x0 analog ground voltage control these bits control the analog ground voltage in 25 mv steps. this should usually be set to vdda/2 or lower for best performance (maximum output swing at minimum thd). this vag reference is also used for the dac and adc voltage reference. so changing this voltage scales the output swing of the dac and the output signal of the adc. 0x00 = 0.800 v 0x1f = 1.575 v
analog integrated circuit device data ? 40 freescale semiconductor SGTL5000 functional device operation programming examples the table 29, chip_mic_ctrl 0x002a register controls the microphone gain and the internal microphone biasing circuitry. 3:1 bias_ctrl rw 0x0 bias control these bits adjust the bias currents for all of the analog blocks. by lowering the bias current a lower quiescent power is achieved. it should be noted that this mode can affect performance by 3-4 db. 0x0 = nominal 0x1-0x3=+12.5% 0x4=-12.5% 0x5=-25% 0x6=-37.5% 0x7=-50% 0 small_pop rw 0x0 vag ramp control setting this bit slows down the vag ramp from ~200 to ~400 ms to reduce the startup pop, but increases the turn on/off time. 0x0 = normal vag ramp 0x1 = slow down vag ramp bits field rw reset definition table 29. chip_mic_ctrl 0x002a 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd bias_resistor rsvd bias_volt rsvd gain bits field rw reset definition 15:10 rsvd ro 0x0 reserved 9:8 bias_resistor rw 0x0 mic bias output impedance adjustment controls an adjustable output impedance for t he microphone bias. if this is set to zero the micbias block is powered off and the output is highz. 0x0 = powered off 0x1 = 2.0 k ? 0x2 = 4.0 k ? 0x3 = 8.0 k ? 7 rsvd ro 0x0 reserved 6:4 bias_volt rw 0x0 mic bias voltage adjustment controls an adjustable bias volt age for the microphone bias amp in 250 mv steps. this bias voltage setting should be no more than vdda-200 mv for adequate power supply rejection. 0x0 = 1.25 v ... 0x7 = 3.00 v 3:2 rsvd ro 0x0 reserved 1:0 gain rw 0x0 mic amplifier gain sets the microphone amplifier gain. at 0 db setting the thd can be slightly higher than other paths- typically around ~65 db. at other gain settings the thd are better. 0x0 = 0 db 0x1 = +20 db 0x2 = +30 db 0x3 = +40 db
analog integrated circuit device data ? freescale semiconductor 41 SGTL5000 functional device operation programming examples table 30. chip_line_out_ctrl 0x002c 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd out_current rsvd lo_vagcntrl bits field rw reset definition 15:12 rsvd ro 0x0 reserved 11:8 out_current rw 0x0 controls the output bias current for the lineout amplifiers. the nominal recommended setting for a 10 k ? load with 1.0 nf load cap is 0x3. there are only 5 valid settings. 0x0=0.18 ma, 0x1=0.27 ma, 0x3=0.36 ma, 0x7=0.45 ma, 0xf=0.54 ma 7:6 rsvd ro 0x0 reserved 5:0 lo_vagcntrl rw 0x0 lineout amplifier analog ground voltage controls the analog ground voltage for the lineout amplifiers in 25 mv steps. this should usually be set to vddio/2. 0x00 = 0.800 v ... 0x1f = 1.575 v ... 0x23 = 1.675 v 0x24-0x3f are invalid table 31. chip_line_out_vol 0x002e 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd lo_vol_right rsvd lo_vol_left bits field rw reset definition 15:13 rsvd ro 0x0 reserved 12:8 lo_vol_right rw 0x4 lineout right channel volume controls the right channel lineout volume in 0.5 db steps. higher codes have more attenuation. see programming information for left channel. 7:5 rsvd ro 0x0 reserved 4:0 lo_vol_left rw 0x4 lineout left channel output level the lo_vol_left is used to normalize the output level of the left line output to full scale based on the values used to set line_out_ctrl -> lo_vagcntrl and chip_ref_ctrl -> vag_val. in general this field should be set to: 40*log(( vag_val )/ (lo_vagcntrl) ) + 15 table 32 shows suggested values based on typical vddio and vdda voltages. after setting to the nominal voltage, this fi eld can be used to adjust the output level in +/-0.5 db increments by using values higher or lower than the nominal setting. table 32. lineout output level values vdda vag_val vddio lo_vagcntrl lo_vol_* 1.8 v 0.9 3.3 v 1.55 0x06 1.8 v 0.9 1.8 v 0.9 0x0f 3.3 v 1.55 1.8 v 0.9 0x19 3.3 v 1.55 3.3 v 1.55 0x0f
analog integrated circuit device data ? 42 freescale semiconductor SGTL5000 functional device operation programming examples the table 33, chip_ana_power 0x0030 register contains all of the power down controls for the analog blocks. the only other power-down cont rols are bias_resistor in the mic_ctrl register and the en_zcd control bits in ana_ctrl. table 33. chip_ana_power 0x0030 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd dac_mono linreg_simple_powerup startup_powerup vddc_chrgpmp_powerup pll_powerup linreg_d_powerup vcoamp_powerup vag_powerup adc_mono reftop_powerup headphone_powerup dac_powerup capless_headphone_powerup adc_powerup lineout_powerup bits field rw reset definition 15 rsvd rw 0x0 reserved 14 dac_mono rw 0x1 while dac_powerup is set, this allows the dac to be put into left only mono operation for power savings. 0x0 = mono (left only) 0x1 = stereo 13 linreg_simple_po werup rw 0x1 power up the simple (low power) digital supply regulator. after reset, this bit can be cleared if vddd is driven ex ternally or the primary di gital linreg is enabled with linreg_d_powerup 0x0 = power down 0x1 = power up 12 startup_powerup rw 0x1 power up the circuitry needed during the power up ramp and reset. after reset this bit can be cleared if vddd is coming from an external source. 0x0 = power down 0x1 = power up 11 vddc_chrgpmp_po werup rw 0x0 power up the vddc charge pump block. if neither vdda or vddio is 3.0 v or larger this bit should be cleared before analog blocks are powered up. 0x0 = power down 0x1 = power up note that for charge pump to function, either the pll must be powered on and programmed correctly (refer to chip_clk_ctrl->mclk_freq description) or the internal oscillator (set clk_top_ctrl->enable_int_osc) must be enabled 10 pll_powerup rw 0x0 pll power up 0x0 = power down 0x1 = power up when cleared, the pll is turned off. this must be set before chip_clk_ctrl -> mclk_freq is programmed to 0x3. t he chip_pll_ctrl register must be configured correctly before setting this bit. 9 linreg_d_powerup rw 0x0 power up the primary vddd linear regulator. 0x0 = power down 0x1 = power up
analog integrated circuit device data ? freescale semiconductor 43 SGTL5000 functional device operation programming examples 8 vcoamp_powerup rw 0x0 power up the pll vco amplifier. 0x0 = power down 0x1 = power up 7 vag_powerup rw 0x0 power up the vag reference buffer. setting this bit starts the power up ramp for the headphone and lineout. the headphone (and/or lineout) powerup should be set before clearing this bit. when this bit is cleared the power-down ramp is started. the headphone (and/or lineout) powerup should stay set until the vag is fully ramped down (200 to 400 ms after clearing this bit). 0x0 = power down 0x1 = power up 6 adc_mono rw 0x1 while adc_powerup is set, this allows the adc to be put into left only mono operation for power savings. this mode is useful when only using the microphone input. 0x0 = mono (left only) 0x1 = stereo 5 reftop_powerup rw 0x1 power up the reference bias currents 0x0 = power down 0x1 = power up this bit can be cleared when the part is a sleep state to minimize analog power. 4 headphone_power up rw 0x0 power up the headphone amplifiers 0x0 = power down 0x1 = power up 3 dac_powerup rw 0x0 power up the dacs 0x0 = power down 0x1 = power up 2 capless_headpho ne_powerup rw 0x0 power up the capless headphone mode 0x0 = power down 0x1 = power up 1 adc_powerup rw 0x0 power up the adcs 0x0 = power down 0x1 = power up 0 lineout_powerup rw 0x0 power up the lineout amplifiers 0x0 = power down 0x1 = power up bits field rw reset definition
analog integrated circuit device data ? 44 freescale semiconductor SGTL5000 functional device operation programming examples the table 34, chip_pll_ctrl 0x0032 register may only be changed after reset, and before pll_powerup is set. table 35, chip_clk_top_ctrl 0x0034 has the miscellaneous controls for the clock block. table 34. chip_pll_ctrl 0x0032 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 int_divisor frac_divisor bits field rw reset definition 15:11 int_divisor rw 0xa this is the integer portion of the pll divisor. to determine the value of this field, use the following calculation: int_divisor = floor(pll_output_freq/input_freq) pll_output_freq = 180.6336 mhz if system sample rate = 44.1 khz else pll_output_freq = 196.608 mhz if system sample rate!= 44.1 khz input_freq = frequency of the external mclk provided if chip_clk_top_ctrl- >input_freq_div2 = 0x0 else input_freq = (frequency of the external mclk provided/2) if chip_clk_top_ctrl->input_freq_div2 = 0x1 10:0 frac_divisor rw 0x0 this is the fractional portion of the pll divi sor. to determine the value of this field, use the following calculation: frac_divisor = ((pll_output_freq/input_freq) - int_divisor)*2048 pll_output_freq = 180.6336 mhz if system sample rate = 44.1 khz else pll_output_freq = 196.608 mhz if system sample rate!= 44.1 khz input_freq = frequency of the external mclk provided if chip_clk_top_ctrl- >input_freq_div2 = 0x0 else input_freq = (frequency of the external mclk provided/2) if chip_clk_top_ctrl->input_freq_div2 = 0x1 table 35. chip_clk_top_ctrl 0x0034 1514131211109876543210 rsvd enable_int_osc rsvd input_freq_div2 rsvd bits field rw reset definition 15:12 reserved ro 0x0 reserved 11 enable_int_osc rw 0x0 setting this bit enables an inte rnal oscillator to be used for the zero cross detectors, the short detect recovery, and the charge pump. this allows the i 2 s clock to be shut off while still operating an analog signal path. this bit can be kept on when the i 2 s clock is enabled, but the i 2 s clock is more accurate so it is preferred to clear this bit when i 2 s is present. 10:4 rsvd rw 0x0 reserved
analog integrated circuit device data ? freescale semiconductor 45 SGTL5000 functional device operation programming examples status bits for analog blocks are found in table 36, chip_ana_status 0x0036 table 37, chip_ana_test1 0x0038 and table 38, chip_ana_test2 0x003a register controls are intended only for debug. 3 input_freq_div2 rw 0x0 sys_mclk divider before pll input 0x0 = pass through 0x1 = sys_mclk is divided by 2 before entering pll this must be set when the input clock is above 17 mhz. this has no effect when the pll is powered down. 2:0 rsvd rw 0x0 reserved bits field rw reset definition table 36. chip_ana_status 0x0036 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd lrshort_sts cshort_sts rsvd pll_is_locked rsvd bits field rw reset definition 15:10 rsvd ro 0x0 reserved 9 lrshort_sts ro 0x0 this bit is high whenever a short is detected on the left or right channel headphone drivers. 0x0 = normal 0x1 = short detected 8 cshort_sts ro 0x0 this bit is high whenever a short is detected on the capless headphone common/ center channel driver. 0x0 = normal 0x1 = short detected 7:5 rsvd ro 0x0 reserved 4 pll_is_locked ro 0x0 this bit goes high after the pll is locked. 0x0 = pll is not locked 0x1 = pll is locked 3:0 rsvd ro 0x0 reserved table 37. chip_ana_test1 0x0038 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 hp_iall_adj hp_i1_adj hp_antipop hp_classab hp_hold_gnd_center hp_hold_gnd vag_doub_current vag_classa tm_adcin_tohp tm_hpcommon tm_select_mic testmode
analog integrated circuit device data ? 46 freescale semiconductor SGTL5000 functional device operation programming examples bits field rw reset definition 15:14 hp_iall_adj rw 0x0 these bits control the overall bias cu rrent of the headphone amplifier (all stages including first and output stage). 0x0=nominal, 0x1=-50%, 0x2=+50%, 0x3=-40% 13:12 hp_i1_adj rw 0x0 these bits control the bias current fo r the first stage of the headphone amplifier. 0x0=nominal, 0x1=-50%, 0x2=+100%, 0x3=+50% 11:9 hp_antipop rw 0x0 these bits control the headphone output current in classa mode and also the pull-down strength while powering off. t hese bits normally are not needed. 8 hp_classab rw 0x1 this defaults high. when this bit is hi gh the headphone is in classab mode. classa mode would normally not be used. 7 hp_hold_gnd_ce nter rw 0x1 this defaults high. when this bit is high and the capless headphone center channel is powered off, the output is tied to ground. th is is the preferred mode of operation for best antipop performance. 6 hp_hold_gnd rw 0x1 this defaults high. when this bit is high and the headphone is powered off, the output is tied to ground. this is the preferred mode of operation for best antipop performance. 5 vag_doub_curre nt rw 0x0 double the vag output current when in classa mode. 4 vag_classa rw 0x0 turn off the classab output current for the vag buffer. the classa current is limited so this may cause clipping in some modes. 3 tm_adcin_tohp rw 0x0 put adcmux output onto the headphone output pin. must remove headphone load and any external headphone compensation for this mode. 2 tm_hpcommon rw 0x0 enable headphone common to be used in adcmux for testing 1 tm_select_mic rw 0x0 enable the mic-adc-dac-hp path 0 testmode rw 0x0 enable the analog test mode paths table 38. chip_ana_test2 0x003a 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd lineout_to_vdda spare monomode_dac vco_tune_again lo_pass_mastervag invert_dac_sample_clock invert_dac_data_timing dac_extend_rtz dac_double_i dac_dis_rtz dac_classa invert_adc_sample_clock invert_adc_data_timing adc_lessi adc_ditheroff bits field rw reset definition 15 rsvd ro 0x0 reserved 14 lineout_to_vdda rw 0x0 changes the lineout amplifier power s upply from vddio to vdda. typically lineout should be on the higher power supply . this bit is useful when vdda is ~3.3 v and vddio is ~1.8 v. 13 spare rw 0x0 spare registers to analog. 12 monomode_dac rw 0x0 copy the left channel dac data to the right channel. this allows both left and right to play from mono dac data. 11 vco_tune_again rw 0x0 when toggled high then low forces the pll vco to retune the number of inverters in the ring oscillator loop.
analog integrated circuit device data ? freescale semiconductor 47 SGTL5000 functional device operation programming examples the table 39, chip_short_ctrl 0x003c register contains controls for the headphone short detectors. 10 lo_pass_masterv ag rw 0x0 tie the main analog vag to the lineout vag. this can improve snr for the lineout when both are the same voltage. 9 invert_dac_sampl e_clock rw 0x0 change the clock edge used for the dac output sampling. 8 invert_dac_data_ timing rw 0x0 change the clock edge used for the digital to analog dac data crossing. 7 dac_extend_rtz rw 0x0 extend the return-to-zero time for the dac. 6 dac_double_i rw 0x0 double the output current of the dac am plifier when it is in classa mode. 5 dac_dis_rtz rw 0x0 turn off the return-to-zero in the dac. in mode cases, this hurts the sndr of the dac. 4 dac_classa rw 0x0 turn off the classab mode in the dac ampl ifier. this mode should normally not be used. the output current is not high enough to support a full scale signal in this mode. 3 invert_adc_sampl e_clock rw 0x0 change the clock edge used for the adc sampling. 2 invert_adc_data_ timing rw 0x0 change the clock edge used for the analog to digital adc data crossing 1 adc_lessi rw 0x0 drops adc bias currents by 20% 0 adc_ditheroff rw 0x0 turns off the adc dithering. bits field rw reset definition table 39. chip_short_ctrl 0x003c 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd lvladjr rsvd lvladjl rsvd lvladjc mode_lr mode_cm bits field rw reset definition 15 rsvd ro 0x0 reserved 14:12 lvladjr rw 0x0 these bits adjust the sensitivity of th e right channel headphone short detector in 25 ma steps.this trip point can vary by ~30% over process so leave plenty of guard band to avoid false trips. this short detect trip po int is also effected by the bias current adjustments made by chip_ref_ctrl -> bias_ctrl and by chip_ana_test1 - > hp_iall_adj. 0x3=25 ma 0x2=50 ma 0x1=75 ma 0x0=100 ma 0x4=125 ma 0x5=150 ma 0x6=175 ma 0x7=200 ma 11 rsvd ro 0x0 reserved
analog integrated circuit device data ? 48 freescale semiconductor SGTL5000 functional device operation programming examples 10:8 lvladjl rw 0x0 these bits adjust the sensitivity of th e left channel headphone short detector in 25 ma steps.this trip point can vary by ~30% over process so leave plenty of guard band to avoid false trips. this short detect trip po int is also effected by the bias current adjustments made by chip_ref_ctrl -> bias_ctrl and by chip_ana_test1 - > hp_iall_adj. 0x3=25 ma 0x2=50 ma 0x1=75 ma 0x0=100 ma 0x4=125 ma 0x5=150 ma 0x6=175 ma 0x7=200 ma 7 rsvd ro 0x0 reserved 6:4 lvladjc rw 0x0 these bits adjust the sensitivity of the capless headphone center channel short detector in 50 ma steps. this trip point can vary by ~30% over process so leave plenty of guard band to avoid false trips. this short dete ct trip point is also effected by the bias current adjustments chip_ref_ctrl -> bias_ctrl and by chip_ana_test1 -> hp_iall_adj. 0x3=50 ma 0x2=100 ma 0x1=150 ma 0x0=200 ma 0x4=250 ma 0x5=300 ma 0x6=350 ma 0x7=400 ma 3:2 mode_lr rw 0x0 these bits control the behavior of the s hort detector for the capless headphone central channel driver. this mode s hould be set prior to powering up the headphone amplifier. when a short is detected the amplifier output switches to classa mode internally to avoid excessive currents. 0x0 = disable short detector, reset short det ect latch, software view non-latched short signal 0x1 = enable short detector and reset the latch at timeout (every ~50 ms) 0x2 = this mode is not used/invalid 0x3 = enable short detector with only manual reset (have to return to 0x0 to reset the latch) 1:0 mode_cm rw 0x0 these bits control the behavior of the s hort detector for the capless headphone central channel driver. this mode s hould be set prior to powering up the headphone amplifier. when a short is detected the amplifier output sw itches to classa mode interally to avoid excessive currents. 0x0 = disable short detector, reset short det ect latch, software view non-latched short signal 0x1 = enable short detector and reset the latch at timeout (every ~50 ms) 0x2 = enable short detector and auto reset when output voltage rises (preferred mode) 0x3 = enable short detector with only manual reset (have to return to 0x0 to reset the latch) bits field rw reset definition
analog integrated circuit device data ? freescale semiconductor 49 SGTL5000 functional device operation programming examples table 40. dap_control 0x0100 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd mix_en rsvd dap_en bits field rw reset definition 15:5 rsvd ro 0x0 reserved 4 mix_en rw 0x0 enable/disable the dap mixer path 0x0 = disable 0x1 = enable when enabled, dap_en must also be enabled to use the mixer. 3:1 rsvd ro 0x0 reserved 0 dap_en rw 0x0 enable/disable digital audio processing (dap) 0x0 = disable. when disabled, no audio passes through. 0x1 = enable. when enabled, audio can pass through dap even if none of the dap functions are enabled. table 41. dap_peq 0x0102 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd en bits field rw reset definition 15:3 rsvd ro 0x0 reserved 2:0 en rw 0x0 set to enable the peq filters 0x0 = disabled 0x1 = 1 filter enabled 0x2 = 2 filters enabled ..... 0x7 = cascaded 7 filters dap_audio_eq->en bit must be set to 1 in order to enable the peq table 42. dap_bass_enhance 0x0104 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd bypass_hpf rsvd cutoff rsvd en bits field rw reset definition 15:9 rsvd ro 0x0 reserved 8 bypass_hpf rw 0x0 bypass high pass filter 0x0 = enable high pass filter 0x1 = bypass high pass filter 7 rsvd ro 0x0 reserved
analog integrated circuit device data ? 50 freescale semiconductor SGTL5000 functional device operation programming examples 6:4 cutoff rw 0x4 set cut-off frequency 0x0 = 80 hz 0x1 = 100 hz 0x2 = 125 hz 0x3 = 150 hz 0x4 = 175 hz 0x5 = 200 hz 0x6 = 225 hz 3:1 rsvd ro 0x0 reserved 0 en rw 0x0 enable/disable bass enhance 0x0 = disable 0x1 = enable table 43. dap_bass_enhance_ctrl 0x0106 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd lr_level rsvd bass_level bits field rw reset definition 15:14 rsvd ro 0x0 reserved 13:8 lr_level rw 0x5 left/right mix level control 0x00= +6.0 db for main channel ...... 0x3f= least l/r channel level 7 rsvd ro 0x0 6:0 bass_level rw 0x1f bass harmonic level control 0x00= most harmonic boost ...... 0x7f=least harmonic boost table 44. dap_audio_eq 0x0108 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd en bits field rw reset definition 15:2 rsvd ro 0x0 reserved 1:0 en rw 0x0 selects between peq/geq/tone control and enables it. 0x0 = disabled. 0x1 = enable peq. note: dap_peq->en bit must also be set to the desired number of filters (bands) in order for the peq to be enabled. 0x2 = enable tone control 0x3 = enable 5 band geq bits field rw reset definition
analog integrated circuit device data ? freescale semiconductor 51 SGTL5000 functional device operation programming examples table 45. dap_sgtl_surround 0x010a 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd width_control rsvd select bits field rw reset definition 15:7 rsvd ro 0x0 reserved 6:4 width_control rw 0x4 freescale surround width control - the widt h control changes the perceived width of the sound field. 0x0 = least width ...... 0x7 = most width 3:2 rsvd ro 0x0 reserved 1:0 select rw 0x0 freescale surround selection 0x0 = disabled 0x1 = disabled 0x2 = mono input enable 0x3 = stereo input enable table 46. dap_filter_coef_access 0x010c 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd wr index bits field rw reset definition 15:9 rsvd ro 0x0 reserved 8 wr wo 0x0 when set, the coefficients written in the t en coefficient data registers are loaded into the filter specified by index 7:0 index rw 0x0 specifies the index for each of the seven bands of the filter coefficient that needs to be written to. each filter has 5 coefficients that need to be loaded into the 10 coefficient registers (msb, lsb) before setting the index and wr bit. steps to write coefficients: 1. write the five 20-bit coefficient values to dap_coef_wr_xx_msb and dap_coef_wr_xx_lsb register s (xx= b0,b1,b2,a1,a2) 2. set index of the coefficient from the table below. 3. set the wr bit to load the coefficient. note: steps 2 and 3 can be performed with a single write to dap_filter_coef_ access register. coefficient address: band 0 = 0x00 band 1 = 0x01 band 2 = 0x02 band 3 = 0x03 band 4 = 0x04 ... band 7 = 0x06
analog integrated circuit device data ? 52 freescale semiconductor SGTL5000 functional device operation programming examples table 47. dap_coef_wr_b0_msb 0x010e 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 bit_19 bit_18 bit_17 bit_16 bit_15 bit_14 bit_13 bit_12 bit_11 bit_10 bit_9 bit_8 bit_7 bit_6 bit_5 bit_4 bits field rw reset definition 15 bit_19 wo 0x0 most significant 16-bits of the 20-bit fi lter coefficient that needs to be written 14 bit_18 wo 0x0 13 bit_17 wo 0x0 12 bit_16 wo 0x0 11 bit_15 wo 0x0 10 bit_14 wo 0x0 9 bit_13 wo 0x0 8 bit_12 wo 0x0 7 bit_11 wo 0x0 6 bit_10 wo 0x0 5 bit_9 wo 0x0 4 bit_8 wo 0x0 3 bit_7 wo 0x0 2 bit_6 wo 0x0 1 bit_5 wo 0x0 0 bit_4 wo 0x0 table 48. dap_coef_wr_b0_lsb 0x0110 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd bit_3 bit_2 bit_1 bit_0 bits field rw reset definition 15:4 rsvd ro 0x0 3 bit_3 wo 0x0 2 bit_2 wo 0x0 1 bit_1 wo 0x0 0 bit_0 wo 0x0 least significant 4 bits of the 20-bit filt er coefficient that needs to be written.
analog integrated circuit device data ? freescale semiconductor 53 SGTL5000 functional device operation programming examples table 49. dap_audio_eq_bass_band0 0x0116 115 hz 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd volume bits field rw reset definition 15:7 rsvd ro 0x0 reserved 6:0 volume rw 0x2f sets tone control bass/geq band0 0x5f = sets to 12 db 0x2f = sets to 0 db 0x00 = sets to -11.75 db each lsb is 0.25 db table 50. dap_audio_eq_band1 0x0118 330 hz 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd volume bits field rw reset definition 15:7 rsvd ro 0x0 reserved 6:0 volume rw 0x2f sets geq band1 0x5f = sets to 12 db 0x2f = sets to 0 db 0x00 = sets to -11.75 db each lsb is 0.25 db table 51. dap_audio_eq_band2 0x011a 990 hz 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd volume bits field rw reset definition 15:7 rsvd ro 0x0 reserved 6:0 volume rw 0x2f sets geq band2 0x5f = sets to 12 db 0x2f = sets to 0 db 0x00 = sets to -11.75 db each lsb is 0.25 db
analog integrated circuit device data ? 54 freescale semiconductor SGTL5000 functional device operation programming examples table 54, dap_main_chan 0x0120 sets the main channel volume level . table 55, dap_mix_chan 0x0122 sets the mix channel volume level . table 52. dap_audio_eq_band3 0x011c 3000 hz 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd volume bits field rw reset definition 15:7 rsvd ro 0x0 reserved 6:0 volume rw 0x2f sets geq band3 0x5f = sets to 12 db 0x2f = sets to 0 db 0x00 = sets to -11.75 db each lsb is 0.25 db table 53. dap_audio_eq_tre ble_band4 0x011e 9900 hz 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd volume bits field rw reset definition 15:7 rsvd ro 0x0 reserved 6:0 volume rw 0x2f sets tone control treble/geq band4 0x5f = sets to 12 db 0x2f = sets to 0 db 0x00 = sets to -11.75 db each lsb is 0.25 db table 54. dap_main_chan 0x0120 1514131211109876543210 vol bits field rw reset definition 15:0 vol rw 0x8000 dap main channel volume 0xffff = 200% 0x8000 (default) = 100% 0x0000 = 0% table 55. dap_mix_chan 0x0122 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 vol bits field rw reset definition 15:0 vol rw 0x0000 dap mix channel volume 0xffff = 200% 0x8000 = 100% 0x0000 (default) = 0%
analog integrated circuit device data ? freescale semiconductor 55 SGTL5000 functional device operation programming examples table 56. dap_avc_ctrl 0x0124 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd rsvd max_gain rsvd lbi_response rsvd hard_limit_en rsvd en bits field rw reset definition 15 rsvd ro 0x0 reserved 14 rsvd rw 0x1 reserved. 13:12 max_gain rw 0x1 maximum gain that can be applied by the avc in expander mode. 0x0 = 0 db gain 0x1 = 6.0 db of gain 0x2 = 12 db of gain 11:10 rsvd ro 0x0 reserved 9:8 lbi_response rw 0x1 integrator response 0x0 = 0 ms lbi 0x1 = 25 ms lbi 0x2 = 50 ms lbi 0x3 = 100 ms lbi 7:6 rsvd ro 0x0 reserved 5 hard_limit_en rw 0x0 enable hard limiter mode 0x0 = hard limit disabled. avc compressor/expander is enabled. 0x1 = hard limit enabled. the signal is limited to the pr ogrammed threshold. (signal saturates at the threshold) 4:1 rsvd ro 0x0 reserved 0 en rw 0x0 enable/disable avc 0x0 = disable 0x1 = enable table 57. dap_avc_threshold 0x0126 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 thresh bits field rw reset definition 15:0 thresh rw 0x1473 avc threshold value threshold is programmable. use the foll owing formula to calculate hex value: hex value = ((10^(threshold_db/20))*0.636)*2^15 threshold can be set in the range of 0 db to -96 db example values: 0x1473 = set threshold to -12 db 0x0a40 = set threshold to -18 db
analog integrated circuit device data ? 56 freescale semiconductor SGTL5000 functional device operation programming examples table 58. dap_avc_attack 0x0128 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd rate bits field rw reset definition 15:12 rsvd ro 0x0 reserved 11:0 rate rw 0x28 avc attack rate this is the rate at which the avc applies attenuation to the signal to bring it to the threshold level. avc attack rate is programmable. to use a custom rate, use the formula below to convert from db/s to hex value: hex value = (1 - (10^(-(rate_dbs/(20*sys_fs)))) * 2^19 where, sys_fs is the system sample rate configured in chip_clk_ctrl register. example values: 0x28 = 32 db/s 0x10 = 8.0 db/s 0x05 = 4.0 db/s 0x03 = 2.0 db/s table 59. dap_avc_decay 0x012a 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd rate bits field rw reset definition 15:12 rsvd ro 0x0 reserved 11:0 rate rw 0x50 avc decay rate this is the rate at which the avc releas es the attenuation previously applied to the signal during attack. avc decay rate is progr ammable. to use a custom rate, use the formula below to convert from db/s to hex value: hex value = (1 - (10^(-(rate_dbs/(20*sys_fs)))) * 2^23 where, sys_fs is the system sample rate configured in chip_clk_ctrl register. example values: 0x284 = 32 db/s 0xa0 = 8.0 db/s 0x50 = 4.0 db/s 0x28 = 2.0 db/s table 60. dap_coef_wr_b1_msb 0x012c 1514131211109876543210 msb bits field rw reset definition 15:0 msb rw 0x0 most significant 16-bits of the 20-bit fi lter coefficient that needs to be written
analog integrated circuit device data ? freescale semiconductor 57 SGTL5000 functional device operation programming examples table 61. dap_coef_wr_b1_lsb 0x012e 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd lsb bits field rw reset definition 15:4 rsvd ro 0x0 reserved 3:0 lsb rw 0x0 least significant 4 bits of the 20-bit filt er coefficient that needs to be written. table 62. dap_coef_wr_b2_msb 0x0130 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 msb bits field rw reset definition 15:0 msb rw 0x0 most significant 16-bits of the 20-bit fi lter coefficient that needs to be written table 63. dap_coef_wr_b2_lsb 0x0132 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd lsb bits field rw reset definition 15:4 rsvd ro 0x0 reserved 3:0 lsb rw 0x0 least significant 4 bits of the 20-bit filt er coefficient that needs to be written. table 64. dap_coef_wr_a1_msb 0x0134 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 msb bits field rw reset definition 15:0 msb rw 0x0 most significant 16-bits of the 20-bit fi lter coefficient that needs to be written table 65. dap_coef_wr_a1_lsb 0x0136 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd lsb bits field rw reset definition 15:4 rsvd ro 0x0 reserved 3:0 lsb rw 0x0 least significant 4 bits of the 20-bit filt er coefficient that needs to be written. table 66. dap_coef_wr_a2_msb 0x0138 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 msb bits field rw reset definition 15:0 msb rw 0x0 most significant 16-bits of the 20-bit fi lter coefficient that needs to be written
analog integrated circuit device data ? 58 freescale semiconductor SGTL5000 functional device operation programming examples table 67. dap_coef_wr_a2_lsb 0x013a 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 rsvd lsb bits field rw reset definition 15:4 rsvd ro 0x0 reserved 3:0 lsb rw 0x0 least significant 4 bits of the 20-bit filt er coefficient that needs to be written.
analog integrated circuit device data ? freescale semiconductor 59 SGTL5000 typical applications introduction typical applications introduction typical connections are shown in the following application diagrams. for new designs, and for either the 20 qfn or 32 qfn part, an external vddd power supply connection is required along with a 0.1 ? f cap connection from vddd to ground. cpfilt note: the cpfilt cap value is 0.1 ? f. if both vddio and vdda are ? 3.0 v, the cpfilt pin must be connected to a 0.1 ? f cap to gnd. if either is > 3.0 v, the cpfilt cap must not be placed. hp_vgnd note: do not connect hp_vgnd to system ground, even when unused. this is a virtual ground (dc voltage) that should never connect to an actual ?0 volt ground?. use the widest, shortest trace possible for the hp_vgnd. figure 19. 32 qfn typical application schematic notes: 1. this 32qfn schematic shows vddd (pin 30) being derived externally. an external vddd is required for new designs. for lowest power operation, vddd can be driven from an external 1.2v switching supply with a 0.1uf capacitor to ground. 2. if both vddio and vdda are equal to or below 3v, the cpfilt pin (pin 17) must be connected to a 0.1uf capacitor to ground. if either is above 3v, this capacitor must not be placed. 3. the above shows i2c implementation as ctrl_mode (pin 32) is tied to ground. in addition, address 0 of the i2c address is 0 as ctrl_adr0_cs (pin 31) is tied to ground. 4. agnd (pin 7) should be "star" connected to the jack grounds for linein and lineout, and to the vag capacitor ground. this node should via to the ground plane (or connected to ground) at a single point. 32qfn typical application schematic solder pad to gnd note: r1 only needed if internal bias_resistor settings are not suitable. note: external vddd required for new designs. note: capless headphone design shown here. for cap-coupled design, see 20qfn typical application schematic. vddio vdda vddd (1.1v - 2.0v, 11ma min) ctrl_clk i2s_sclk ctrl_data i2s_din i2s_dout sys_mclk i2s_lrclk line_in_l line_in_r line_out_r line_out_l c1 0.1uf c4 0.1uf c3 0.1uf u1 SGTL5000_32qfn i2s_sclk 24 nc 22 linein_l 14 cpfilt 18 vddio 20 nc 19 sys_mclk 21 i2s_dout 25 i2s_din 26 hp_l 6 ctrl_data 27 nc 28 ctrl_clk 29 gnd 1 nc 8 hp_r 2 gnd 3 vdda 5 lineout_l 12 lineout_r 11 mic 15 nc 17 linein_r 13 agnd 7 i2s_lrclk 23 vddd 30 ctrl_adr0_cs 31 ctrl_mode 32 hp_vgnd 4 nc 9 vag 10 mic_bias 16 gnd pad c10 1uf c7 1uf x1 mic 1 2 j1 audio jack 2 5 1 4 3 c5 0.1uf c6 1uf c8 1uf c9 1uf c2 0.1uf r1 2.2k
analog integrated circuit device data ? 60 freescale semiconductor SGTL5000 typical applications introduction figure 20. 20 qfn typical application schematic note: external vddd required for new designs. note: cap-coupled headphone design shown here. for capless design, see 32qfn typical application schematic. note: r1 only needed if internal bias_resistor settings are not suitable. solder pad to gnd note: bottom pad/flag/paddle must be connected to ground. vddio vdda vddd (1.1v - 2.0v, 11ma min) line_in_left line_in_right line_out_left line_out_right i2c_clk i2c_data i2s_sclk i2sdout i2s_din i2s_lrclk sys_mclk u1 SGTL5000_20qfn gnd pad vag 5 hp_r 1 hp_vgnd 2 vdda 3 hp_l 4 mic 10 mic_bias 11 lineout_r 6 lineout_l 7 linein_r 8 i2s_lrclk 14 i2s_din 17 i2s_dout 16 i2s_sclk 15 ctrl_clk 19 ctrl_data 18 sys_mclk 13 vddio 12 vddd 20 linein_l 9 c1 0.1uf x1 mic 1 2 c3 220uf c11 1uf c5 0.1uf c9 1uf c4 0.1uf c6 0.1uf c7 0.1uf c10 1uf c8 1uf j1 audio jack 2 5 1 4 3 c12 1uf r1 2.2k c2 220uf
analog integrated circuit device data ? freescale semiconductor 61 SGTL5000 packaging package dimensions packaging package dimensions for the most current pa ckage revision, visit www.freescale.com and perform a keyword sear ch using the 98axxxxxxxxx listed on the following pages. ep suffix 20-pin 98are10742d revision 0
analog integrated circuit device data ? 62 freescale semiconductor SGTL5000 packaging package dimensions ep suffix 20-pin 98are10742d revision 0
analog integrated circuit device data ? freescale semiconductor 63 SGTL5000 packaging package dimensions ep suffix 20-pin 98are10742d revision 0
analog integrated circuit device data ? 64 freescale semiconductor SGTL5000 packaging package dimensions fc suffix 32-pin 98are10739d revision 0
analog integrated circuit device data ? freescale semiconductor 65 SGTL5000 packaging package dimensions fc suffix 32-pin 98are10739d revision 0
analog integrated circuit device data ? 66 freescale semiconductor SGTL5000 packaging package dimensions fc suffix 32-pin 98are10739d revision 0
analog integrated circuit device data ? freescale semiconductor 67 SGTL5000 revision history revision history revision date description 3.0 6/2010 ? conversion from the old freescale form and style to the current version. no existing content has been added, altered, or removed. 4.0 9/2010 ? corrected pin 4 explanation (32-pin package ) and added pin 3 (32-pin package) to table 1. 5.0 5/2013 ?corrected lineout - 100 db snr (-60 db input) and -85 db thd+n (vddio = 3.3 v) in features ? added note for hp_vgnd and cpfilt in pin definition table ? moved recommended operating conditions to separate table ? added input/output electric al characteristics ?corrected linein input level from 0.75 to 0.57 ? corrected table 7 test conditions unless otherwise noted: vddio = 1.8 v, vdda = 1.8 v, ta = 25 c, slave mode, fs = 48 khz, mclk = 256 fs, 24 bit input ? added note for hp_vgnd and cpfilt to typical applications introduction ? corrected pin nomenclature as required for consistency ? clarified bits 3:0 in figure 27 ? corrected pin name in figure 3 and table 1 ? corrected address name in figure 6 , i2c , spi ? changed limits on lineout output level ? changed 0x00 = sets to 12 db to 11.75 db, and deleted ?to c onvert db to hex value, use hex value = 4* db value + 47? on tables 49, 50, 51, 52 and 53. ? revised back page. updated document properties . added smartmos sentence to first paragraph. ? added comment for ?new designs? where applicable ? corrected pin designations in the pin connections section ? changed limits and conditions for lineout output level and lineout output level ? added two new application diagrams in typical applications section 6.0 11/2013 ? modified front page intro text to include more target markets and to remove type of ic technology ? increased hp max output power from 45 mw to 62.5 mw at 1.02 khz based on bench measurements ? changed typ linein input impedance from 100kohm to 29 kohm at 1.02 khz based on bench measurements ? added mic input impedance based on bench measurements ? removed 10 kohm min linein input impedance, and added 29 kohm as typ in table 5 and table 6 ? added 12 khz sample rate to functional description introduction, and added 12 khz and 24 khz sample rates to table 8
document number: SGTL5000 rev. 6.0 11/2013 information in this document is provided solely to enable sys tem and software implementers to use freescale products. there are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits based on the information in this document. freescale reserves the right to make changes without fu rther notice to any products herein. freescale makes no warranty, representation, or guarantee regarding the suitability of its products for any particular purpose, nor does freescale assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. ?typical? parameters that may be provided in freescale data sheets and/or s pecifications can and do vary in diff erent applications, and actual performance may vary over time. all operating parameters, including ?typicals,? must be validated for each customer application by customer?s technical experts. freescale does not convey any license under its patent rights nor the rights of others. freescale sells products pursuant to standard terms and conditi ons of sale, which can be found at the following address: freescale.com/salestermsandconditions . freescale and the freescale logo, are trademarks of freescale semiconductor, inc., reg. u.s. pat. & tm. off. all other product or service names are the property of their respective owners. ? 2013 freescale semiconductor, inc. how to reach us: home page: freescale.com web support: freescale.com/support


▲Up To Search▲   

 
Price & Availability of SGTL5000

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X